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 Index: linux-2.6.28.5/arch/mips/include/asm/mach-bcm47xx/gpio.h
10 ===================================================================
11 --- linux-2.6.28.5.orig/arch/mips/include/asm/mach-bcm47xx/gpio.h 2009-02-14 20:52:31.000000000 +0100
12 +++ linux-2.6.28.5/arch/mips/include/asm/mach-bcm47xx/gpio.h 2009-02-14 21:01:20.000000000 +0100
13 @@ -31,24 +31,28 @@ static inline void gpio_set_value(unsign
15 static inline int gpio_direction_input(unsigned gpio)
17 - return ssb_gpio_outen(&ssb_bcm47xx, 1 << gpio, 0);
18 + ssb_gpio_outen(&ssb_bcm47xx, 1 << gpio, 0);
22 static inline int gpio_direction_output(unsigned gpio, int value)
24 - return ssb_gpio_outen(&ssb_bcm47xx, 1 << gpio, 1 << gpio);
25 + ssb_gpio_outen(&ssb_bcm47xx, 1 << gpio, 1 << gpio);
29 -static int gpio_intmask(unsigned gpio, int value)
30 +static inline int gpio_intmask(unsigned gpio, int value)
32 - return ssb_gpio_intmask(&ssb_bcm47xx, 1 << gpio,
33 - value ? 1 << gpio : 0);
34 + ssb_gpio_intmask(&ssb_bcm47xx, 1 << gpio,
35 + value ? 1 << gpio : 0);
39 -static int gpio_polarity(unsigned gpio, int value)
40 +static inline int gpio_polarity(unsigned gpio, int value)
42 - return ssb_gpio_polarity(&ssb_bcm47xx, 1 << gpio,
43 - value ? 1 << gpio : 0);
44 + ssb_gpio_polarity(&ssb_bcm47xx, 1 << gpio,
45 + value ? 1 << gpio : 0);