diff options
author | Imre Deak <imre.deak@solidboot.com> | 2006-09-25 12:41:27 +0300 |
---|---|---|
committer | Tony Lindgren <tony@atomide.com> | 2006-09-25 12:41:27 +0300 |
commit | 5a4e86daa29e73a02ce8eb484837813e341a0b8a (patch) | |
tree | 6363d06807e52b09bdfe1c9a5652929120b9a366 | |
parent | 0e0a198690f5769e5687cb0d66e4486796ccdef0 (diff) | |
download | talos-obmc-linux-5a4e86daa29e73a02ce8eb484837813e341a0b8a.tar.gz talos-obmc-linux-5a4e86daa29e73a02ce8eb484837813e341a0b8a.zip |
ARM: OMAP: GPIO: fix MPUIO check
- MPUIO doesn't exist on OMAP2
- no error was returned for too big MPUIO numbers
Signed-off-by: Imre Deak <imre.deak@solidboot.com>
Signed-off-by: Juha Yrjola <juha.yrjola@solidboot.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
-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 @@ #define OMAP24XX_GPIO_CLEARDATAOUT 0x0090 #define OMAP24XX_GPIO_SETDATAOUT 0x0094 -#define OMAP_MPUIO_MASK (~OMAP_MAX_GPIO_LINES & 0xff) - struct gpio_bank { void __iomem *base; u16 irq; @@ -216,11 +214,13 @@ static inline int gpio_valid(int gpio) { if (gpio < 0) return -1; +#ifndef CONFIG_ARCH_OMAP24XX if (OMAP_GPIO_IS_MPUIO(gpio)) { - if ((gpio & OMAP_MPUIO_MASK) > 16) + if (gpio >= MAX_GPIO_LINES + 16) return -1; return 0; } +#endif #ifdef CONFIG_ARCH_OMAP15XX if (cpu_is_omap15xx() && gpio < 16) return 0; |