diff options
author | Paul Mundt <lethal@linux-sh.org> | 2009-10-13 11:27:08 +0900 |
---|---|---|
committer | Paul Mundt <lethal@linux-sh.org> | 2009-10-13 11:27:08 +0900 |
commit | 95019b48addc014c7de6653517663527a1747fb7 (patch) | |
tree | 5488066e45e8e9de1fef431f39a93cd2d5967b61 /arch/arm/mach-ep93xx/include/mach/gpio.h | |
parent | 7a0064d67215c53dce56839c82db504d0a066b79 (diff) | |
parent | 964f7e5a56814b32c727821de77d22bd7ef782bc (diff) | |
download | op-kernel-dev-95019b48addc014c7de6653517663527a1747fb7.zip op-kernel-dev-95019b48addc014c7de6653517663527a1747fb7.tar.gz |
Merge branch 'sh/stable-updates'
Diffstat (limited to 'arch/arm/mach-ep93xx/include/mach/gpio.h')
-rw-r--r-- | arch/arm/mach-ep93xx/include/mach/gpio.h | 16 |
1 files changed, 4 insertions, 12 deletions
diff --git a/arch/arm/mach-ep93xx/include/mach/gpio.h b/arch/arm/mach-ep93xx/include/mach/gpio.h index 0a1498a..c991b14 100644 --- a/arch/arm/mach-ep93xx/include/mach/gpio.h +++ b/arch/arm/mach-ep93xx/include/mach/gpio.h @@ -114,17 +114,9 @@ extern void ep93xx_gpio_int_debounce(unsigned int irq, int enable); * B0..B7 (7..15) to irq 72..79, and * F0..F7 (16..24) to irq 80..87. */ -static inline int gpio_to_irq(unsigned gpio) -{ - if (gpio <= EP93XX_GPIO_LINE_MAX_IRQ) - return 64 + gpio; - - return -EINVAL; -} - -static inline int irq_to_gpio(unsigned irq) -{ - return irq - gpio_to_irq(0); -} +#define gpio_to_irq(gpio) \ + (((gpio) <= EP93XX_GPIO_LINE_MAX_IRQ) ? (64 + (gpio)) : -EINVAL) + +#define irq_to_gpio(irq) ((irq) - gpio_to_irq(0)) #endif |