Commit 5523f86b authored by Shawn Guo's avatar Shawn Guo Committed by Grant Likely

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: default avatarShawn Guo <shawn.guo@linaro.org>
Signed-off-by: default avatarGrant Likely <grant.likely@secretlab.ca>
parent 27810c5e
...@@ -83,7 +83,7 @@ static int gpio_set_irq_type(struct irq_data *d, u32 type) ...@@ -83,7 +83,7 @@ static int gpio_set_irq_type(struct irq_data *d, u32 type)
edge = GPIO_INT_FALL_EDGE; edge = GPIO_INT_FALL_EDGE;
break; break;
case IRQ_TYPE_EDGE_BOTH: case IRQ_TYPE_EDGE_BOTH:
val = gpio_get_value(gpio & 31); val = gpio_get_value(gpio);
if (val) { if (val) {
edge = GPIO_INT_LOW_LEV; edge = GPIO_INT_LOW_LEV;
pr_debug("mxc: set GPIO %d to low trigger\n", gpio); pr_debug("mxc: set GPIO %d to low trigger\n", gpio);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment