gpio: pisosr: remove unneeded direction_output() callback
PATCH 1/1 gpio: pisosr: remove unneeded direction_output() callback
From: Bartosz Golaszewski <[email protected]>
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.
Signed-off-by Bartosz Golaszewski <[email protected]>
--- drivers/gpio/gpio-pisosr.c | 8 -------- 1 file changed, 8 deletions(-)
drivers/gpio/gpio-pisosr.c +0 -8
@@ -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,
Signature · 1 line
2.48.1
Bartosz Golaszewski
AppliedFrom: Bartosz Golaszewski <[email protected]>
Quoted 5 lines · Bartosz Golaszewski
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.
Applied, thanks!
[1/1] gpio: pisosr: remove unneeded direction_output() callback
https://git.kernel.org/brgl/linux/c/34e61ba8193945c90f1bcaa9d595fc05c586663d
Best regards,
Signature · 1 line
Bartosz Golaszewski <[email protected]>