diff options
author | Len Brown <len.brown@intel.com> | 2009-04-05 02:14:15 -0400 |
---|---|---|
committer | Len Brown <len.brown@intel.com> | 2009-04-05 02:14:15 -0400 |
commit | 478c6a43fcbc6c11609f8cee7c7b57223907754f (patch) | |
tree | a7f7952099da60d33032aed6de9c0c56c9f8779e /arch/blackfin/include/asm/gpio.h | |
parent | 8a3f257c704e02aee9869decd069a806b45be3f1 (diff) | |
parent | 6bb597507f9839b13498781e481f5458aea33620 (diff) |
Merge branch 'linus' into release
Conflicts:
arch/x86/kernel/cpu/cpufreq/longhaul.c
Signed-off-by: Len Brown <len.brown@intel.com>
Diffstat (limited to 'arch/blackfin/include/asm/gpio.h')
-rw-r--r-- | arch/blackfin/include/asm/gpio.h | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/arch/blackfin/include/asm/gpio.h b/arch/blackfin/include/asm/gpio.h index d4a082ef75b..fe139619351 100644 --- a/arch/blackfin/include/asm/gpio.h +++ b/arch/blackfin/include/asm/gpio.h @@ -110,7 +110,7 @@ * MODIFICATION HISTORY : **************************************************************/ -#ifndef BF548_FAMILY +#ifndef CONFIG_BF54x void set_gpio_dir(unsigned, unsigned short); void set_gpio_inen(unsigned, unsigned short); void set_gpio_polar(unsigned, unsigned short); @@ -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) |