projects
/
platform
/
kernel
/
linux-stable.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a666487
)
Blackfin arch: add a check to make sure only Blackfin GPIOs may generate IRQs
author
Michael Hennerich
<michael.hennerich@analog.com>
Sat, 28 Mar 2009 13:18:45 +0000
(21:18 +0800)
committer
Bryan Wu
<cooloney@kernel.org>
Sat, 28 Mar 2009 13:18:45 +0000
(21:18 +0800)
Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
arch/blackfin/include/asm/gpio.h
patch
|
blob
|
history
diff --git
a/arch/blackfin/include/asm/gpio.h
b/arch/blackfin/include/asm/gpio.h
index
d4a082e
..
3c99ddc
100644
(file)
--- a/
arch/blackfin/include/asm/gpio.h
+++ b/
arch/blackfin/include/asm/gpio.h
@@
-303,7
+303,10
@@
static inline void gpio_set_value(unsigned gpio, int value)
static inline int gpio_to_irq(unsigned gpio)
{
- return (gpio + GPIO_IRQ_BASE);
+ if (likely(gpio < MAX_BLACKFIN_GPIOS))
+ return gpio + GPIO_IRQ_BASE;
+
+ return -EINVAL;
}
static inline int irq_to_gpio(unsigned irq)