]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
gpio: tpic2810: remove unneeded callbacks
authorBartosz Golaszewski <bartosz.golaszewski@linaro.org>
Wed, 2 Jul 2025 09:14:07 +0000 (11:14 +0200)
committerBartosz Golaszewski <bartosz.golaszewski@linaro.org>
Mon, 7 Jul 2025 07:45:30 +0000 (09:45 +0200)
GPIO core can handle output-only chips that don't implement the get()
and direction_input() callbacks. There's no need to provide dummy
implementation of the latter in the driver so drop it.

Link: https://lore.kernel.org/r/20250702-gpiochip-set-rv-gpio-round3-v1-6-0d23be74f71d@linaro.org
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
drivers/gpio/gpio-tpic2810.c

index effb7b8ff81fd51664b7f51a124aaafbf3504feb..e99725bd3d63d47ed6dbb800aacac14b1ee96b9c 100644 (file)
@@ -34,13 +34,6 @@ static int tpic2810_get_direction(struct gpio_chip *chip,
        return GPIO_LINE_DIRECTION_OUT;
 }
 
-static int tpic2810_direction_input(struct gpio_chip *chip,
-                                   unsigned offset)
-{
-       /* This device is output only */
-       return -EINVAL;
-}
-
 static int tpic2810_direction_output(struct gpio_chip *chip,
                                     unsigned offset, int value)
 {
@@ -83,7 +76,6 @@ static const struct gpio_chip template_chip = {
        .label                  = "tpic2810",
        .owner                  = THIS_MODULE,
        .get_direction          = tpic2810_get_direction,
-       .direction_input        = tpic2810_direction_input,
        .direction_output       = tpic2810_direction_output,
        .set                    = tpic2810_set,
        .set_multiple           = tpic2810_set_multiple,