Commit 8742bc92 authored by Herbert Valerio Riedel's avatar Herbert Valerio Riedel Committed by Russell King

[ARM] 4569/1: ep93xx_gpio_irq_type(): fix spurious enumeration offset for FGPIO handling

The EP93XX_GPIO_LINE_F() macro is supposed to be called with a line
number between 0 and 7, but the current code causes it to get called
with an spuriously offset number range {16..23}.
Signed-off-by: default avatarHerbert Valerio Riedel <hvr@gnu.org>
Signed-off-by: default avatarLennert Buytenhek <kernel@wantstofly.org>
Signed-off-by: default avatarRussell King <rmk+kernel@arm.linux.org.uk>
parent 4f6627ac
...@@ -336,7 +336,7 @@ static int ep93xx_gpio_irq_type(unsigned int irq, unsigned int type) ...@@ -336,7 +336,7 @@ static int ep93xx_gpio_irq_type(unsigned int irq, unsigned int type)
if (line >= 0 && line < 16) { if (line >= 0 && line < 16) {
gpio_line_config(line, GPIO_IN); gpio_line_config(line, GPIO_IN);
} else { } else {
gpio_line_config(EP93XX_GPIO_LINE_F(line), GPIO_IN); gpio_line_config(EP93XX_GPIO_LINE_F(line-16), GPIO_IN);
} }
port = line >> 3; port = line >> 3;
......
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