aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpio/gpio-mxc.c
diff options
context:
space:
mode:
authorShawn Guo <shawn.guo@linaro.org>2011-06-11 13:33:29 -0400
committerGrant Likely <grant.likely@secretlab.ca>2011-06-11 23:01:41 -0400
commit5523f86beab2b87d42cd58aca9bd5cee5466c6e3 (patch)
tree114919eb239117310aa48877752d0bc81d47eb3d /drivers/gpio/gpio-mxc.c
parent27810c5e7f8f2ddf036c16b5e40fd22abdc041f9 (diff)
gpio/mxc: fix a bug with gpio_get_value calling
When calling gpio_get_value, the gpio number other than bit offset should be passed as the argument. Signed-off-by: Shawn Guo <shawn.guo@linaro.org> Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Diffstat (limited to 'drivers/gpio/gpio-mxc.c')
-rw-r--r--drivers/gpio/gpio-mxc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpio/gpio-mxc.c b/drivers/gpio/gpio-mxc.c
index 950e53a636fa..2f6a81b8f12e 100644
--- a/drivers/gpio/gpio-mxc.c
+++ b/drivers/gpio/gpio-mxc.c
@@ -83,7 +83,7 @@ static int gpio_set_irq_type(struct irq_data *d, u32 type)
83 edge = GPIO_INT_FALL_EDGE; 83 edge = GPIO_INT_FALL_EDGE;
84 break; 84 break;
85 case IRQ_TYPE_EDGE_BOTH: 85 case IRQ_TYPE_EDGE_BOTH:
86 val = gpio_get_value(gpio & 31); 86 val = gpio_get_value(gpio);
87 if (val) { 87 if (val) {
88 edge = GPIO_INT_LOW_LEV; 88 edge = GPIO_INT_LOW_LEV;
89 pr_debug("mxc: set GPIO %d to low trigger\n", gpio); 89 pr_debug("mxc: set GPIO %d to low trigger\n", gpio);