mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-12-28 11:24:07 -05:00
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 <bartosz.golaszewski@linaro.org>
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user