diff options
author | Bartosz Golaszewski <bartosz.golaszewski@linaro.org> | 2025-04-07 09:20:15 +0200 |
---|---|---|
committer | Greg Ungerer <gerg@kernel.org> | 2025-05-19 08:54:30 +1000 |
commit | 0c4aba403f4f294c15e2bbc8e1164aa68bc233bd (patch) | |
tree | 2eb495657c5f24665bca07850c4d008fb2c28b54 | |
parent | a5806cd506af5a7c19bcd596e4708b5c464bfd21 (diff) |
m68k: coldfire: gpio: use new line value setter callbacks
struct gpio_chip now has callbacks for setting line values that return
an integer, allowing to indicate failures. Convert the driver to using
them.
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Greg Ungerer <gerg@linux-m68k.org>
-rw-r--r-- | arch/m68k/coldfire/gpio.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/arch/m68k/coldfire/gpio.c b/arch/m68k/coldfire/gpio.c index ca26de257871..30e5a4ed799d 100644 --- a/arch/m68k/coldfire/gpio.c +++ b/arch/m68k/coldfire/gpio.c @@ -123,10 +123,12 @@ static int mcfgpio_direction_output(struct gpio_chip *chip, unsigned offset, return __mcfgpio_direction_output(offset, value); } -static void mcfgpio_set_value(struct gpio_chip *chip, unsigned offset, - int value) +static int mcfgpio_set_value(struct gpio_chip *chip, unsigned int offset, + int value) { __mcfgpio_set_value(offset, value); + + return 0; } static int mcfgpio_request(struct gpio_chip *chip, unsigned offset) @@ -158,7 +160,7 @@ static struct gpio_chip mcfgpio_chip = { .direction_input = mcfgpio_direction_input, .direction_output = mcfgpio_direction_output, .get = mcfgpio_get_value, - .set = mcfgpio_set_value, + .set_rv = mcfgpio_set_value, .to_irq = mcfgpio_to_irq, .base = 0, .ngpio = MCFGPIO_PIN_MAX, |