Skip to content

Commit

Permalink
gpio/mxc: fix a bug with gpio_get_value calling
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Shawn Guo authored and Grant Likely committed Jun 12, 2011
1 parent 27810c5 commit 5523f86
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/gpio/gpio-mxc.c
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ static int gpio_set_irq_type(struct irq_data *d, u32 type)
edge = GPIO_INT_FALL_EDGE;
break;
case IRQ_TYPE_EDGE_BOTH:
val = gpio_get_value(gpio & 31);
val = gpio_get_value(gpio);
if (val) {
edge = GPIO_INT_LOW_LEV;
pr_debug("mxc: set GPIO %d to low trigger\n", gpio);
Expand Down

0 comments on commit 5523f86

Please sign in to comment.