mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-27 03:10:12 +00:00
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>
This commit is contained in:
parent
5bc3744c38
commit
03b765237b
1 changed files with 1 additions and 1 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue