Skip to content

Commit 6b94bf9

Browse files
author
Bartosz Golaszewski
committed
MIPS: alchemy: gpio: use new GPIO line value setter callbacks for the remaining chips
Previous commit missed two other places that need converting, it only came out in tests on autobuilders now. Convert the rest of the driver. Fixes: 68bdc4d ("MIPS: alchemy: gpio: use new line value setter callbacks") Acked-by: Thomas Bogendoerfer <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Bartosz Golaszewski <[email protected]>
1 parent a86240a commit 6b94bf9

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

arch/mips/alchemy/common/gpiolib.c

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,11 @@ static int gpio2_get(struct gpio_chip *chip, unsigned offset)
4040
return !!alchemy_gpio2_get_value(offset + ALCHEMY_GPIO2_BASE);
4141
}
4242

43-
static void gpio2_set(struct gpio_chip *chip, unsigned offset, int value)
43+
static int gpio2_set(struct gpio_chip *chip, unsigned offset, int value)
4444
{
4545
alchemy_gpio2_set_value(offset + ALCHEMY_GPIO2_BASE, value);
46+
47+
return 0;
4648
}
4749

4850
static int gpio2_direction_input(struct gpio_chip *chip, unsigned offset)
@@ -68,10 +70,12 @@ static int gpio1_get(struct gpio_chip *chip, unsigned offset)
6870
return !!alchemy_gpio1_get_value(offset + ALCHEMY_GPIO1_BASE);
6971
}
7072

71-
static void gpio1_set(struct gpio_chip *chip,
73+
static int gpio1_set(struct gpio_chip *chip,
7274
unsigned offset, int value)
7375
{
7476
alchemy_gpio1_set_value(offset + ALCHEMY_GPIO1_BASE, value);
77+
78+
return 0;
7579
}
7680

7781
static int gpio1_direction_input(struct gpio_chip *chip, unsigned offset)
@@ -97,7 +101,7 @@ struct gpio_chip alchemy_gpio_chip[] = {
97101
.direction_input = gpio1_direction_input,
98102
.direction_output = gpio1_direction_output,
99103
.get = gpio1_get,
100-
.set = gpio1_set,
104+
.set_rv = gpio1_set,
101105
.to_irq = gpio1_to_irq,
102106
.base = ALCHEMY_GPIO1_BASE,
103107
.ngpio = ALCHEMY_GPIO1_NUM,
@@ -107,7 +111,7 @@ struct gpio_chip alchemy_gpio_chip[] = {
107111
.direction_input = gpio2_direction_input,
108112
.direction_output = gpio2_direction_output,
109113
.get = gpio2_get,
110-
.set = gpio2_set,
114+
.set_rv = gpio2_set,
111115
.to_irq = gpio2_to_irq,
112116
.base = ALCHEMY_GPIO2_BASE,
113117
.ngpio = ALCHEMY_GPIO2_NUM,

0 commit comments

Comments
 (0)