bcm47xx: Fix GPIO data direction output bit assignment
[openwrt/svn-archive/archive.git] / target / linux / brcm47xx / files / include / asm-mips / mach-bcm947xx / gpio.h
index 4a897d1ea4efedd88776a184f3e667ece9aabd4c..e7807ce723ca3ced9ff27c47c02d830de772bab6 100644 (file)
@@ -22,7 +22,8 @@ static inline int gpio_direction_input(unsigned gpio)
 
 static inline int gpio_direction_output(unsigned gpio, int value)
 {
-       ssb_gpio_outen(&ssb, 1 << gpio, value << gpio);
+       ssb_gpio_out(&ssb, 1 << gpio, (value ? 1 << gpio : 0));
+       ssb_gpio_outen(&ssb, 1 << gpio, 1 << gpio);
        return 0;
 }