summaryrefslogtreecommitdiffstats
path: root/drivers/gpio
diff options
context:
space:
mode:
authorRoland Stigge <stigge@antcom.de>2012-03-05 23:01:10 +0100
committerGrant Likely <grant.likely@secretlab.ca>2012-03-12 11:25:30 -0600
commit8e5fb37b9873eacb2381f2931d252b6db6e2cb16 (patch)
tree7232857eab0a85f5e938584d38d782d93de40918 /drivers/gpio
parent68942edb09f69b6e09522d1d346665eb3aadde49 (diff)
downloadlinux-8e5fb37b9873eacb2381f2931d252b6db6e2cb16.tar.gz
linux-8e5fb37b9873eacb2381f2931d252b6db6e2cb16.tar.bz2
linux-8e5fb37b9873eacb2381f2931d252b6db6e2cb16.zip
GPIO: LPC32xx: Fix missing bit selection mask
Add missing mask to pin bit selection in gpio-lpc32xx.c (#define GPIO3_PIN_IN_SEL) Signed-off-by: Roland Stigge <stigge@antcom.de> Acked-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Diffstat (limited to 'drivers/gpio')
-rw-r--r--drivers/gpio/gpio-lpc32xx.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpio/gpio-lpc32xx.c b/drivers/gpio/gpio-lpc32xx.c
index ddfacc5ce56d..14a2f297a0b4 100644
--- a/drivers/gpio/gpio-lpc32xx.c
+++ b/drivers/gpio/gpio-lpc32xx.c
@@ -59,7 +59,7 @@
#define GPO3_PIN_TO_BIT(x) (1 << (x))
#define GPIO012_PIN_IN_SEL(x, y) (((x) >> (y)) & 1)
#define GPIO3_PIN_IN_SHIFT(x) ((x) == 5 ? 24 : 10 + (x))
-#define GPIO3_PIN_IN_SEL(x, y) ((x) >> GPIO3_PIN_IN_SHIFT(y))
+#define GPIO3_PIN_IN_SEL(x, y) (((x) >> GPIO3_PIN_IN_SHIFT(y)) & 1)
#define GPIO3_PIN5_IN_SEL(x) (((x) >> 24) & 1)
#define GPI3_PIN_IN_SEL(x, y) (((x) >> (y)) & 1)