aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-tegra/include/mach
diff options
context:
space:
mode:
authorStephen Warren <swarren@nvidia.com>2011-08-22 19:39:57 -0400
committerRussell King <rmk+kernel@arm.linux.org.uk>2011-08-24 03:28:38 -0400
commitece88dc08b87501025927bf52e460655f89e2c02 (patch)
tree80401ab46ecb8197a71ccb12ed07471ebe0dd3f6 /arch/arm/mach-tegra/include/mach
parent438a99c078b1bc3c9aebd92e7928f2477311d3e5 (diff)
ARM: 7054/1: arm/tegra: Delete custom gpio_to_irq, and irq_to_gpio
By not definining a custom gpio_to_irq, the default gpiolib version is used, allowing platform consolidation. irq_to_gpio is deprecated and in the process of being removed. Make that happen now for ARM Tegra. This also partially fixes the Tegra build; it was broken because gpio.h referred to EINVAL, which wasn't always defined when <mach/gpio.h> was included. Signed-off-by: Stephen Warren <swarren@nvidia.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch/arm/mach-tegra/include/mach')
-rw-r--r--arch/arm/mach-tegra/include/mach/gpio.h16
1 files changed, 0 insertions, 16 deletions
diff --git a/arch/arm/mach-tegra/include/mach/gpio.h b/arch/arm/mach-tegra/include/mach/gpio.h
index e3538055f40..284a19e12d7 100644
--- a/arch/arm/mach-tegra/include/mach/gpio.h
+++ b/arch/arm/mach-tegra/include/mach/gpio.h
@@ -26,22 +26,6 @@
26#define TEGRA_NR_GPIOS INT_GPIO_NR 26#define TEGRA_NR_GPIOS INT_GPIO_NR
27 27
28#define TEGRA_GPIO_TO_IRQ(gpio) (INT_GPIO_BASE + (gpio)) 28#define TEGRA_GPIO_TO_IRQ(gpio) (INT_GPIO_BASE + (gpio))
29#define TEGRA_IRQ_TO_GPIO(irq) ((irq) - INT_GPIO_BASE)
30
31static inline int gpio_to_irq(unsigned int gpio)
32{
33 if (gpio < TEGRA_NR_GPIOS)
34 return INT_GPIO_BASE + gpio;
35 return -EINVAL;
36}
37#define gpio_to_irq gpio_to_irq
38
39static inline int irq_to_gpio(unsigned int irq)
40{
41 if ((irq >= INT_GPIO_BASE) && (irq < INT_GPIO_BASE + INT_GPIO_NR))
42 return irq - INT_GPIO_BASE;
43 return -EINVAL;
44}
45 29
46struct tegra_gpio_table { 30struct tegra_gpio_table {
47 int gpio; /* GPIO number */ 31 int gpio; /* GPIO number */