From d350e4cf40cd1139de9c7c33ea625f024b65db18 Mon Sep 17 00:00:00 2001 From: Gabor Juhos Date: Tue, 16 Mar 2010 19:53:25 +0000 Subject: [PATCH] ar71xx: fix semantics error in the __ar71xx_gpio_get_value function. * Thanks to Pascal Dornier SVN-Revision: 20247 --- target/linux/ar71xx/files/arch/mips/ar71xx/gpio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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); -- 2.30.2