Skip to content

Commit 4605601

Browse files
author
Bartosz Golaszewski
committed
gpio: aspeed-sgpio: 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. Link: https://lore.kernel.org/r/20250303-gpiochip-set-conversion-v1-15-1d5cceeebf8b@linaro.org Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
1 parent 952cf09 commit 4605601

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

drivers/gpio/gpio-aspeed-sgpio.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -209,13 +209,13 @@ static int sgpio_set_value(struct gpio_chip *gc, unsigned int offset, int val)
209209
return 0;
210210
}
211211

212-
static void aspeed_sgpio_set(struct gpio_chip *gc, unsigned int offset, int val)
212+
static int aspeed_sgpio_set(struct gpio_chip *gc, unsigned int offset, int val)
213213
{
214214
struct aspeed_sgpio *gpio = gpiochip_get_data(gc);
215215

216216
guard(raw_spinlock_irqsave)(&gpio->lock);
217217

218-
sgpio_set_value(gc, offset, val);
218+
return sgpio_set_value(gc, offset, val);
219219
}
220220

221221
static int aspeed_sgpio_dir_in(struct gpio_chip *gc, unsigned int offset)
@@ -596,7 +596,7 @@ static int __init aspeed_sgpio_probe(struct platform_device *pdev)
596596
gpio->chip.request = NULL;
597597
gpio->chip.free = NULL;
598598
gpio->chip.get = aspeed_sgpio_get;
599-
gpio->chip.set = aspeed_sgpio_set;
599+
gpio->chip.set_rv = aspeed_sgpio_set;
600600
gpio->chip.set_config = aspeed_sgpio_set_config;
601601
gpio->chip.label = dev_name(&pdev->dev);
602602
gpio->chip.base = -1;

0 commit comments

Comments
 (0)