diff options
Diffstat (limited to 'arch/arm/plat-omap/gpio.c')
-rw-r--r-- | arch/arm/plat-omap/gpio.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/arch/arm/plat-omap/gpio.c b/arch/arm/plat-omap/gpio.c index cd7f973fb286..d5221b2d4599 100644 --- a/arch/arm/plat-omap/gpio.c +++ b/arch/arm/plat-omap/gpio.c | |||
@@ -110,8 +110,6 @@ | |||
110 | #define OMAP24XX_GPIO_CLEARDATAOUT 0x0090 | 110 | #define OMAP24XX_GPIO_CLEARDATAOUT 0x0090 |
111 | #define OMAP24XX_GPIO_SETDATAOUT 0x0094 | 111 | #define OMAP24XX_GPIO_SETDATAOUT 0x0094 |
112 | 112 | ||
113 | #define OMAP_MPUIO_MASK (~OMAP_MAX_GPIO_LINES & 0xff) | ||
114 | |||
115 | struct gpio_bank { | 113 | struct gpio_bank { |
116 | void __iomem *base; | 114 | void __iomem *base; |
117 | u16 irq; | 115 | u16 irq; |
@@ -216,11 +214,13 @@ static inline int gpio_valid(int gpio) | |||
216 | { | 214 | { |
217 | if (gpio < 0) | 215 | if (gpio < 0) |
218 | return -1; | 216 | return -1; |
217 | #ifndef CONFIG_ARCH_OMAP24XX | ||
219 | if (OMAP_GPIO_IS_MPUIO(gpio)) { | 218 | if (OMAP_GPIO_IS_MPUIO(gpio)) { |
220 | if ((gpio & OMAP_MPUIO_MASK) > 16) | 219 | if (gpio >= MAX_GPIO_LINES + 16) |
221 | return -1; | 220 | return -1; |
222 | return 0; | 221 | return 0; |
223 | } | 222 | } |
223 | #endif | ||
224 | #ifdef CONFIG_ARCH_OMAP15XX | 224 | #ifdef CONFIG_ARCH_OMAP15XX |
225 | if (cpu_is_omap15xx() && gpio < 16) | 225 | if (cpu_is_omap15xx() && gpio < 16) |
226 | return 0; | 226 | return 0; |