diff options
author | Gabor Juhos <juhosg@openwrt.org> | 2010-03-16 19:53:25 +0000 |
---|---|---|
committer | Gabor Juhos <juhosg@openwrt.org> | 2010-03-16 19:53:25 +0000 |
commit | 9de158aa40ddcd2ba1d9d0e3108ba2904330113c (patch) | |
tree | 4c4a243b3089f08d5247fdb5f3aa4c8420e2c840 | |
parent | 1400c16dddc9aa4abd4b99a359bacb83c593259e (diff) | |
download | master-187ad058-9de158aa40ddcd2ba1d9d0e3108ba2904330113c.tar.gz master-187ad058-9de158aa40ddcd2ba1d9d0e3108ba2904330113c.tar.bz2 master-187ad058-9de158aa40ddcd2ba1d9d0e3108ba2904330113c.zip |
ar71xx: fix semantics error in the __ar71xx_gpio_get_value function.
* Thanks to Pascal Dornier
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@20247 3c298f89-4303-0410-b956-a3cf2f4a3e73
-rw-r--r-- | target/linux/ar71xx/files/arch/mips/ar71xx/gpio.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/target/linux/ar71xx/files/arch/mips/ar71xx/gpio.c b/target/linux/ar71xx/files/arch/mips/ar71xx/gpio.c index 1b5da4dc40..dd5b9bb8d2 100644 --- a/target/linux/ar71xx/files/arch/mips/ar71xx/gpio.c +++ b/target/linux/ar71xx/files/arch/mips/ar71xx/gpio.c @@ -38,7 +38,7 @@ EXPORT_SYMBOL(__ar71xx_gpio_set_value); int __ar71xx_gpio_get_value(unsigned gpio) { - return !!(__raw_readl(ar71xx_gpio_base + GPIO_REG_IN) & (1 << gpio)); + return (__raw_readl(ar71xx_gpio_base + GPIO_REG_IN) >> gpio) & 1; } EXPORT_SYMBOL(__ar71xx_gpio_get_value); |