diff options
author | Thomas Kunze <thommycheck@gmx.de> | 2009-02-10 20:59:05 +0100 |
---|---|---|
committer | Thomas Kunze <thommycheck@gmx.de> | 2009-02-10 20:59:05 +0100 |
commit | 4be205e17f2f4497ff936255c5bba7553bc39dc9 (patch) | |
tree | f3b472118758d0f1b352834810b7bd294a4454d0 /packages/linux/linux-2.6.28/collie/0015-SA1100-make-gpio_to_irq-and-reverse-a-macro.patch | |
parent | 0345d624647954e3a49e05b8c221f8281e0897eb (diff) |
linux_2.6.28: add collie patches
Diffstat (limited to 'packages/linux/linux-2.6.28/collie/0015-SA1100-make-gpio_to_irq-and-reverse-a-macro.patch')
-rw-r--r-- | packages/linux/linux-2.6.28/collie/0015-SA1100-make-gpio_to_irq-and-reverse-a-macro.patch | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/packages/linux/linux-2.6.28/collie/0015-SA1100-make-gpio_to_irq-and-reverse-a-macro.patch b/packages/linux/linux-2.6.28/collie/0015-SA1100-make-gpio_to_irq-and-reverse-a-macro.patch new file mode 100644 index 0000000000..99d0314a46 --- /dev/null +++ b/packages/linux/linux-2.6.28/collie/0015-SA1100-make-gpio_to_irq-and-reverse-a-macro.patch @@ -0,0 +1,43 @@ +From 87e4ecb2702d0d1a800da0ba81cd867b0f150410 Mon Sep 17 00:00:00 2001 +From: Thomas Kunze <thommycheck@gmx.de> +Date: Mon, 9 Feb 2009 23:14:44 +0100 +Subject: [PATCH 15/23] SA1100: make gpio_to_irq and reverse a macro + +The function can't be used for static initialisations so +convert them to macros. +--- + arch/arm/mach-sa1100/include/mach/gpio.h | 19 ++++--------------- + 1 files changed, 4 insertions(+), 15 deletions(-) + +diff --git a/arch/arm/mach-sa1100/include/mach/gpio.h b/arch/arm/mach-sa1100/include/mach/gpio.h +index 582a0c9..7befc10 100644 +--- a/arch/arm/mach-sa1100/include/mach/gpio.h ++++ b/arch/arm/mach-sa1100/include/mach/gpio.h +@@ -49,20 +49,9 @@ static inline void gpio_set_value(unsigned gpio, int value) + + #define gpio_cansleep __gpio_cansleep + +-static inline unsigned gpio_to_irq(unsigned gpio) +-{ +- if (gpio < 11) +- return IRQ_GPIO0 + gpio; +- else +- return IRQ_GPIO11 - 11 + gpio; +-} +- +-static inline unsigned irq_to_gpio(unsigned irq) +-{ +- if (irq < IRQ_GPIO11_27) +- return irq - IRQ_GPIO0; +- else +- return irq - IRQ_GPIO11 + 11; +-} ++#define gpio_to_irq(gpio) ((gpio < 11) ? (IRQ_GPIO0 + gpio) : \ ++ (IRQ_GPIO11 - 11 + gpio)) ++#define irq_to_gpio(irq) ((irq < IRQ_GPIO11_27) ? (irq - IRQ_GPIO0) : \ ++ (irq - IRQ_GPIO11 + 11)) + + #endif +-- +1.5.6.5 + |