Skip to content

Commit fb52f32

Browse files
author
Bartosz Golaszewski
committed
ARM: s3c/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. Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Bartosz Golaszewski <[email protected]>
1 parent dd8a6af commit fb52f32

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

arch/arm/mach-s3c/gpio-samsung.c

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -430,8 +430,8 @@ static int samsung_gpiolib_4bit2_output(struct gpio_chip *chip,
430430
return 0;
431431
}
432432

433-
static void samsung_gpiolib_set(struct gpio_chip *chip,
434-
unsigned offset, int value)
433+
static int samsung_gpiolib_set(struct gpio_chip *chip, unsigned int offset,
434+
int value)
435435
{
436436
struct samsung_gpio_chip *ourchip = to_samsung_gpio(chip);
437437
void __iomem *base = ourchip->base;
@@ -447,6 +447,8 @@ static void samsung_gpiolib_set(struct gpio_chip *chip,
447447
__raw_writel(dat, base + 0x04);
448448

449449
samsung_gpio_unlock(ourchip, flags);
450+
451+
return 0;
450452
}
451453

452454
static int samsung_gpiolib_get(struct gpio_chip *chip, unsigned offset)
@@ -515,7 +517,7 @@ static void __init samsung_gpiolib_add(struct samsung_gpio_chip *chip)
515517
if (!gc->direction_output)
516518
gc->direction_output = samsung_gpiolib_2bit_output;
517519
if (!gc->set)
518-
gc->set = samsung_gpiolib_set;
520+
gc->set_rv = samsung_gpiolib_set;
519521
if (!gc->get)
520522
gc->get = samsung_gpiolib_get;
521523

0 commit comments

Comments
 (0)