diff options
author | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2009-03-30 07:04:53 +0400 |
---|---|---|
committer | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2009-03-30 07:04:53 +0400 |
commit | 9ff9a26b786c35ee8d2a66222924a807ec851a9f (patch) | |
tree | db432a17bccca1ca2c16907f0ee83ac449ed4012 /arch/blackfin/include/asm/gpio.h | |
parent | 0a3108beea9143225119d5e7c72a8e2c64f3eb7d (diff) | |
parent | 0d34fb8e93ceba7b6dad0062dbb4a0813bacd75b (diff) | |
download | linux-9ff9a26b786c35ee8d2a66222924a807ec851a9f.tar.xz |
Merge commit 'origin/master' into next
Manual merge of:
arch/powerpc/include/asm/elf.h
drivers/i2c/busses/i2c-mpc.c
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 d4a082ef75b4..fe139619351f 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) |