浏览代码

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>
Stephen Warren 14 年之前
父节点
当前提交
ece88dc08b
共有 1 个文件被更改,包括 0 次插入16 次删除
  1. 0 16
      arch/arm/mach-tegra/include/mach/gpio.h

+ 0 - 16
arch/arm/mach-tegra/include/mach/gpio.h

@@ -26,22 +26,6 @@
 #define TEGRA_NR_GPIOS		INT_GPIO_NR
 #define TEGRA_NR_GPIOS		INT_GPIO_NR
 
 
 #define TEGRA_GPIO_TO_IRQ(gpio) (INT_GPIO_BASE + (gpio))
 #define TEGRA_GPIO_TO_IRQ(gpio) (INT_GPIO_BASE + (gpio))
-#define TEGRA_IRQ_TO_GPIO(irq) ((irq) - INT_GPIO_BASE)
-
-static inline int gpio_to_irq(unsigned int gpio)
-{
-	if (gpio < TEGRA_NR_GPIOS)
-		return INT_GPIO_BASE + gpio;
-	return -EINVAL;
-}
-#define gpio_to_irq gpio_to_irq
-
-static inline int irq_to_gpio(unsigned int irq)
-{
-	if ((irq >= INT_GPIO_BASE) && (irq < INT_GPIO_BASE + INT_GPIO_NR))
-		return irq - INT_GPIO_BASE;
-	return -EINVAL;
-}
 
 
 struct tegra_gpio_table {
 struct tegra_gpio_table {
 	int	gpio;	/* GPIO number */
 	int	gpio;	/* GPIO number */