| To: | linux-mips@linux-mips.org |
|---|---|
| Subject: | [PATCH -queue] BCM63xx: avoid namespace clash on GPIO_DIR_{IN,OUT} |
| From: | Florian Fainelli <florian@openwrt.org> |
| Date: | Tue, 4 May 2010 10:38:57 +0200 |
| Cc: | Ralf Baechle <ralf@linux-mips.org> |
| Dkim-signature: | v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:sender:from:date:subject :mime-version:x-uid:x-length:to:cc:content-type :content-transfer-encoding:message-id; bh=rbjRXH8tZ58nbX53qOfJTQnl2FUfIRwITprd9yxF9kY=; b=VaOja2U8OPOyH1wOb7nEDFX5QXFR4JBhz0xXmSHX05iSrJU6Li8uLYlFaeWSiCLXb3 bCY2taP3DfjqIvKXVaY6GN0nhqRmzgJMjhUkIoxt8hLV7hRco7ywVA0dvs+2oqG3F2iQ y0zrSKDRzhKOABuT1HQeOAv0E/AwXCh13MX3w= |
| Domainkey-signature: | a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=sender:from:date:subject:mime-version:x-uid:x-length:to:cc :content-type:content-transfer-encoding:message-id; b=tXoo2ixt1LeZwbbTqo+8ZAE12Nq1fp+gsRFfkmXvvo8YQqAPYYEYGw7VBYl5c9wu2d oxGf5UvucL/WAy41zbB9jeNTqdXmIDHKXs9f4YOPpKXfw5YhawV5TOc/3Prt9KFnuGyI 1sPq3U9j3JvV8s9Ur0WdxL0KY2m6r5z6fHbiE= |
| Original-recipient: | rfc822;linux-mips@linux-mips.org |
| Sender: | linux-mips-bounce@linux-mips.org |
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>
---
diff --git a/arch/mips/bcm63xx/gpio.c b/arch/mips/bcm63xx/gpio.c
index 315bc7f..f560fe7 100644
--- a/arch/mips/bcm63xx/gpio.c
+++ b/arch/mips/bcm63xx/gpio.c
@@ -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);
}
diff --git a/arch/mips/include/asm/mach-bcm63xx/bcm63xx_gpio.h
b/arch/mips/include/asm/mach-bcm63xx/bcm63xx_gpio.h
index 43d4da0..3999ec0 100644
--- a/arch/mips/include/asm/mach-bcm63xx/bcm63xx_gpio.h
+++ b/arch/mips/include/asm/mach-bcm63xx/bcm63xx_gpio.h
@@ -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 */
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| ||
| Previous by Date: | Re: Unexpected behaviour when catching SIGFPE on FPU-less system, Shane McDonald |
|---|---|
| Next by Date: | [PATCH 0/12] add basic gdium support, yajin |
| Previous by Thread: | [PATCH] Apply kmap_high_get with MIPS, Dezhong Diao |
| Next by Thread: | Re: [PATCH -queue] BCM63xx: avoid namespace clash on GPIO_DIR_{IN,OUT}, Ralf Baechle |
| Indexes: | [Date] [Thread] [Top] [All Lists] |