From: Bartosz Golaszewski Date: Wed, 25 Jun 2025 08:12:22 +0000 (+0200) Subject: gpio: pisosr: remove unneeded direction_output() callback X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=34e61ba8193945c90f1bcaa9d595fc05c586663d;p=thirdparty%2Flinux.git gpio: pisosr: remove unneeded direction_output() callback GPIO core can handle input-only chips that don't implement the direction_output() callback at all. There's no need for the driver to provide a dummy implementation so drop it. Link: https://lore.kernel.org/r/20250625081222.12744-1-brgl@bgdev.pl Signed-off-by: Bartosz Golaszewski --- diff --git a/drivers/gpio/gpio-pisosr.c b/drivers/gpio/gpio-pisosr.c index e3013e778e151..a69b74866a134 100644 --- a/drivers/gpio/gpio-pisosr.c +++ b/drivers/gpio/gpio-pisosr.c @@ -67,13 +67,6 @@ static int pisosr_gpio_direction_input(struct gpio_chip *chip, return 0; } -static int pisosr_gpio_direction_output(struct gpio_chip *chip, - unsigned offset, int value) -{ - /* This device is input only */ - return -EINVAL; -} - static int pisosr_gpio_get(struct gpio_chip *chip, unsigned offset) { struct pisosr_gpio *gpio = gpiochip_get_data(chip); @@ -108,7 +101,6 @@ static const struct gpio_chip template_chip = { .owner = THIS_MODULE, .get_direction = pisosr_gpio_get_direction, .direction_input = pisosr_gpio_direction_input, - .direction_output = pisosr_gpio_direction_output, .get = pisosr_gpio_get, .get_multiple = pisosr_gpio_get_multiple, .base = -1,