From 34e61ba8193945c90f1bcaa9d595fc05c586663d Mon Sep 17 00:00:00 2001 From: Bartosz Golaszewski Date: Wed, 25 Jun 2025 10:12:22 +0200 Subject: [PATCH] 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 --- drivers/gpio/gpio-pisosr.c | 8 -------- 1 file changed, 8 deletions(-) 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, -- 2.47.2