diff options
author | Michael Hennerich <michael.hennerich@analog.com> | 2007-06-11 04:37:57 -0400 |
---|---|---|
committer | Bryan Wu <bryan.wu@analog.com> | 2007-06-11 04:37:57 -0400 |
commit | e7613aab91270a6c76c61d3a1c05eaaa882b1842 (patch) | |
tree | c060e22607db01ce66085e491aba71b80b191b18 /arch/blackfin | |
parent | 00163e869e44f5489c33cd3ec0e502c33a0d4ba7 (diff) |
Blackfin arch: As Mike pointed out range goes form m..MAX_BLACKFIN_GPIO -1
Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Mike Frysinger <michael.frysinger@analog.com>
Signed-off-by: Bryan Wu <bryan.wu@analog.com>
Diffstat (limited to 'arch/blackfin')
-rw-r--r-- | arch/blackfin/kernel/bfin_gpio.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/blackfin/kernel/bfin_gpio.c b/arch/blackfin/kernel/bfin_gpio.c index 3f49fae1cb1f..8cefed8cf5d9 100644 --- a/arch/blackfin/kernel/bfin_gpio.c +++ b/arch/blackfin/kernel/bfin_gpio.c | |||
@@ -138,7 +138,7 @@ static unsigned int sic_iwr_irqs[gpio_bank(MAX_BLACKFIN_GPIOS)] = {IRQ_PROG0_INT | |||
138 | 138 | ||
139 | inline int check_gpio(unsigned short gpio) | 139 | inline int check_gpio(unsigned short gpio) |
140 | { | 140 | { |
141 | if (gpio > MAX_BLACKFIN_GPIOS) | 141 | if (gpio >= MAX_BLACKFIN_GPIOS) |
142 | return -EINVAL; | 142 | return -EINVAL; |
143 | return 0; | 143 | return 0; |
144 | } | 144 | } |