aboutsummaryrefslogtreecommitdiff
path: root/arch
diff options
context:
space:
mode:
authorHartley Sweeten <hartleys@visionengravers.com>2009-10-05 23:15:32 +0100
committerRussell King <rmk+kernel@arm.linux.org.uk>2009-10-07 13:12:58 +0100
commitcc1ad4a69667be885ac6036a315066854ef8c871 (patch)
treeb33b0b1b2aae28767b93cd411608b5e94998d0e6 /arch
parent1f8db4fc1271a42496778c0ff18153da56f0f844 (diff)
ARM: 5745/1: Change ep93xx gpio_irq static inlines to macros
From: Ryan Mallon <ryan@bluewatersys.com> Change the gpio_to_irq and irq_to_gpio static inline functions to macros so that they can be used in variable initialisers. Signed-off-by: Ryan Mallon <ryan@bluewatersys.com> Acked-by: H Hartley Sweeten <hsweeten@visionengravers.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch')
-rw-r--r--arch/arm/mach-ep93xx/include/mach/gpio.h16
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 0a1498ae899..c991b149bdf 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