diff options
author | Arvind Yadav <arvind.yadav.cs@gmail.com> | 2018-04-27 14:44:00 +0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab+samsung@kernel.org> | 2018-05-09 23:17:15 +0300 |
commit | 03b765237b0f728c2586b557fbfaed86bff7bf07 (patch) | |
tree | 2bf2b29649433081136eb2afb957e1dc49ecdcd3 | |
parent | 5bc3744c38e75f169b0e7eefebe033e2937fd71c (diff) | |
download | linux-03b765237b0f728c2586b557fbfaed86bff7bf07.tar.xz |
media: platform: Use gpio_is_valid()
Replace the manual validity checks for the GPIO with the
gpio_is_valid().
Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
-rw-r--r-- | drivers/media/platform/via-camera.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/media/platform/via-camera.c b/drivers/media/platform/via-camera.c index e9a02639554b..f01c3e813247 100644 --- a/drivers/media/platform/via-camera.c +++ b/drivers/media/platform/via-camera.c @@ -178,7 +178,7 @@ static int via_sensor_power_setup(struct via_camera *cam) cam->power_gpio = viafb_gpio_lookup("VGPIO3"); cam->reset_gpio = viafb_gpio_lookup("VGPIO2"); - if (cam->power_gpio < 0 || cam->reset_gpio < 0) { + if (!gpio_is_valid(cam->power_gpio) || !gpio_is_valid(cam->reset_gpio)) { dev_err(&cam->platdev->dev, "Unable to find GPIO lines\n"); return -EINVAL; } |