1 The GPIO API is supposed to return 0 or a negative error code,
2 but the SSB GPIO functions return the bitmask of the GPIO register.
3 Fix this by ignoring the bitmask and always returning 0. The SSB GPIO functions can't fail.
9 --- a/arch/mips/include/asm/mach-bcm47xx/gpio.h
10 +++ b/arch/mips/include/asm/mach-bcm47xx/gpio.h
11 @@ -31,24 +31,28 @@ static inline void gpio_set_value(unsign
13 static inline int gpio_direction_input(unsigned gpio)
15 - return ssb_gpio_outen(&ssb_bcm47xx, 1 << gpio, 0);
16 + ssb_gpio_outen(&ssb_bcm47xx, 1 << gpio, 0);
20 static inline int gpio_direction_output(unsigned gpio, int value)
22 - return ssb_gpio_outen(&ssb_bcm47xx, 1 << gpio, 1 << gpio);
23 + ssb_gpio_outen(&ssb_bcm47xx, 1 << gpio, 1 << gpio);
27 -static int gpio_intmask(unsigned gpio, int value)
28 +static inline int gpio_intmask(unsigned gpio, int value)
30 - return ssb_gpio_intmask(&ssb_bcm47xx, 1 << gpio,
31 - value ? 1 << gpio : 0);
32 + ssb_gpio_intmask(&ssb_bcm47xx, 1 << gpio,
33 + value ? 1 << gpio : 0);
37 -static int gpio_polarity(unsigned gpio, int value)
38 +static inline int gpio_polarity(unsigned gpio, int value)
40 - return ssb_gpio_polarity(&ssb_bcm47xx, 1 << gpio,
41 - value ? 1 << gpio : 0);
42 + ssb_gpio_polarity(&ssb_bcm47xx, 1 << gpio,
43 + value ? 1 << gpio : 0);