Skip to content

Commit 0c4aba4

Browse files
Bartosz GolaszewskiGreg Ungerer
authored andcommitted
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 <[email protected]> Reviewed-by: Linus Walleij <[email protected]> Signed-off-by: Greg Ungerer <[email protected]>
1 parent a5806cd commit 0c4aba4

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

arch/m68k/coldfire/gpio.c

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -123,10 +123,12 @@ static int mcfgpio_direction_output(struct gpio_chip *chip, unsigned offset,
123123
return __mcfgpio_direction_output(offset, value);
124124
}
125125

126-
static void mcfgpio_set_value(struct gpio_chip *chip, unsigned offset,
127-
int value)
126+
static int mcfgpio_set_value(struct gpio_chip *chip, unsigned int offset,
127+
int value)
128128
{
129129
__mcfgpio_set_value(offset, value);
130+
131+
return 0;
130132
}
131133

132134
static int mcfgpio_request(struct gpio_chip *chip, unsigned offset)
@@ -158,7 +160,7 @@ static struct gpio_chip mcfgpio_chip = {
158160
.direction_input = mcfgpio_direction_input,
159161
.direction_output = mcfgpio_direction_output,
160162
.get = mcfgpio_get_value,
161-
.set = mcfgpio_set_value,
163+
.set_rv = mcfgpio_set_value,
162164
.to_irq = mcfgpio_to_irq,
163165
.base = 0,
164166
.ngpio = MCFGPIO_PIN_MAX,

0 commit comments

Comments
 (0)