]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
media: solo6x10: remove unneeded GPIO direction setters
authorBartosz Golaszewski <bartosz.golaszewski@linaro.org>
Mon, 16 Jun 2025 07:18:51 +0000 (09:18 +0200)
committerHans Verkuil <hverkuil@xs4all.nl>
Tue, 17 Jun 2025 08:35:12 +0000 (10:35 +0200)
GPIO core already handles missing direction_input/output() callbacks.
The ones in this driver also effectively return magic numbers which is
not optimal either (the number accidentally corresponds with -EPERM which
is different from the number GPIOLIB returns and so inconsistent). Just
remove them.

Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
drivers/media/pci/solo6x10/solo6x10-gpio.c

index 084c30760e459e37cd1800132a93dfb0fc70398e..f51f865c69bd7b04fac7a1f951c734965d8fc993 100644 (file)
@@ -116,18 +116,6 @@ static int solo_gpiochip_get_direction(struct gpio_chip *chip,
        return -1;
 }
 
-static int solo_gpiochip_direction_input(struct gpio_chip *chip,
-                                        unsigned int offset)
-{
-       return -1;
-}
-
-static int solo_gpiochip_direction_output(struct gpio_chip *chip,
-                                         unsigned int offset, int value)
-{
-       return -1;
-}
-
 static int solo_gpiochip_get(struct gpio_chip *chip,
                                                unsigned int offset)
 {
@@ -167,8 +155,6 @@ int solo_gpio_init(struct solo_dev *solo_dev)
        solo_dev->gpio_dev.can_sleep = 0;
 
        solo_dev->gpio_dev.get_direction = solo_gpiochip_get_direction;
-       solo_dev->gpio_dev.direction_input = solo_gpiochip_direction_input;
-       solo_dev->gpio_dev.direction_output = solo_gpiochip_direction_output;
        solo_dev->gpio_dev.get = solo_gpiochip_get;
        solo_dev->gpio_dev.set = solo_gpiochip_set;