MIPS: BCM63xx: Avoid namespace clash on GPIO_DIR_{IN,OUT}
authorFlorian Fainelli <florian@openwrt.org>
Tue, 4 May 2010 08:38:57 +0000 (10:38 +0200)
committerRalf Baechle <ralf@linux-mips.org>
Fri, 21 May 2010 20:31:22 +0000 (21:31 +0100)
This is too generic a name, so prefix it with BCM63XX_ to avoid potential
namespace clashes when including <asm/gpio.h>.

Signed-off-by: Florian Fainelli <ffainelli@freebox.fr>
To:     linux-mips@linux-mips.org
Patchwork: http://patchwork.linux-mips.org/patch/1171/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
arch/mips/bcm63xx/gpio.c
arch/mips/include/asm/mach-bcm63xx/bcm63xx_gpio.h

index 315bc7f79ce15bf9ff78f57b6f331200478c27d0..f560fe7d38ddafd0920f3afbea58ffb91683dcc5 100644 (file)
@@ -91,7 +91,7 @@ static int bcm63xx_gpio_set_direction(struct gpio_chip *chip,
 
        spin_lock_irqsave(&bcm63xx_gpio_lock, flags);
        tmp = bcm_gpio_readl(reg);
-       if (dir == GPIO_DIR_IN)
+       if (dir == BCM63XX_GPIO_DIR_IN)
                tmp &= ~mask;
        else
                tmp |= mask;
@@ -103,14 +103,14 @@ static int bcm63xx_gpio_set_direction(struct gpio_chip *chip,
 
 static int bcm63xx_gpio_direction_input(struct gpio_chip *chip, unsigned gpio)
 {
-       return bcm63xx_gpio_set_direction(chip, gpio, GPIO_DIR_IN);
+       return bcm63xx_gpio_set_direction(chip, gpio, BCM63XX_GPIO_DIR_IN);
 }
 
 static int bcm63xx_gpio_direction_output(struct gpio_chip *chip,
                                         unsigned gpio, int value)
 {
        bcm63xx_gpio_set(chip, gpio, value);
-       return bcm63xx_gpio_set_direction(chip, gpio, GPIO_DIR_OUT);
+       return bcm63xx_gpio_set_direction(chip, gpio, BCM63XX_GPIO_DIR_OUT);
 }
 
 
index 43d4da0b1e9fe5f7ce0795b41a259a36b861ad60..3999ec0aa7f5b99c2d57e06cb20a876a372ff06b 100644 (file)
@@ -20,7 +20,7 @@ static inline unsigned long bcm63xx_gpio_count(void)
        }
 }
 
-#define GPIO_DIR_OUT   0x0
-#define GPIO_DIR_IN    0x1
+#define BCM63XX_GPIO_DIR_OUT   0x0
+#define BCM63XX_GPIO_DIR_IN    0x1
 
 #endif /* !BCM63XX_GPIO_H */