From d3cf33a4ae5d393b489ad4410ee5fc30720f38aa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20B=C3=BCsch?= Date: Sat, 15 Mar 2008 20:52:02 +0000 Subject: [PATCH] bcm47xx: Fix GPIO data direction output bit assignment SVN-Revision: 10605 --- .../linux/brcm47xx/files/include/asm-mips/mach-bcm947xx/gpio.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/target/linux/brcm47xx/files/include/asm-mips/mach-bcm947xx/gpio.h b/target/linux/brcm47xx/files/include/asm-mips/mach-bcm947xx/gpio.h index 4a897d1ea4..e7807ce723 100644 --- a/target/linux/brcm47xx/files/include/asm-mips/mach-bcm947xx/gpio.h +++ b/target/linux/brcm47xx/files/include/asm-mips/mach-bcm947xx/gpio.h @@ -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; }