diff options
author | 2025-02-20 10:56:59 +0100 | |
---|---|---|
committer | 2025-02-26 11:17:39 +0100 | |
commit | 8ce258f62f90cb2d339cc39fa43e5634594a9dfb (patch) | |
tree | 0097852131964323c05d439333405f792db43440 /drivers/gpio/gpio-latch.c | |
parent | leds: aw200xx: don't use return with gpiod_set_value() variants (diff) | |
download | wireguard-linux-8ce258f62f90cb2d339cc39fa43e5634594a9dfb.tar.xz wireguard-linux-8ce258f62f90cb2d339cc39fa43e5634594a9dfb.zip |
gpiolib: make value setters have return values
Change the in-kernel consumer interface for GPIOs: make all variants of
value setters that don't have a return value, return a signed integer
instead. That will allow these routines to indicate failures to callers.
This doesn't change the implementation just yet, we'll do it in
subsequent commits.
We need to update the gpio-latch module as it passes the address of
value setters as a function pointer argument and thus cares about its
type.
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Acked-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com>
Link: https://lore.kernel.org/r/20250220-gpio-set-retval-v2-2-bc4cfd38dae3@linaro.org
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
Diffstat (limited to 'drivers/gpio/gpio-latch.c')
-rw-r--r-- | drivers/gpio/gpio-latch.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpio/gpio-latch.c b/drivers/gpio/gpio-latch.c index 46cdfb08747a..64174ea7d008 100644 --- a/drivers/gpio/gpio-latch.c +++ b/drivers/gpio/gpio-latch.c @@ -73,7 +73,7 @@ static int gpio_latch_get_direction(struct gpio_chip *gc, unsigned int offset) } static void gpio_latch_set_unlocked(struct gpio_latch_priv *priv, - void (*set)(struct gpio_desc *desc, int value), + int (*set)(struct gpio_desc *desc, int value), unsigned int offset, bool val) { int latch = offset / priv->n_latched_gpios; |