[PATCH 1/1] gpio: gpio-mxs: remove the duplicated micro define

From: Dong Aisheng
Date: Tue Nov 15 2011 - 04:43:31 EST


Signed-off-by: Dong Aisheng <dong.aisheng@xxxxxxxxxx>
Cc: Grant Likely <grant.likely@xxxxxxxxxxxx>
Cc: Arnd Bergmann <arnd@xxxxxxxx>
Cc: Sascha Hauer <s.hauer@xxxxxxxxxxxxxx>
Cc: Shawn Guo <shawn.guo@xxxxxxxxxxxxx>
---
drivers/gpio/gpio-mxs.c | 17 +++++++----------
1 files changed, 7 insertions(+), 10 deletions(-)

diff --git a/drivers/gpio/gpio-mxs.c b/drivers/gpio/gpio-mxs.c
index 385c58e..b9f7567 100644
--- a/drivers/gpio/gpio-mxs.c
+++ b/drivers/gpio/gpio-mxs.c
@@ -31,9 +31,6 @@
#include <linux/module.h>
#include <mach/mxs.h>

-#define MXS_SET 0x4
-#define MXS_CLR 0x8
-
#define PINCTRL_DOUT(n) ((cpu_is_mx23() ? 0x0500 : 0x0700) + (n) * 0x10)
#define PINCTRL_DIN(n) ((cpu_is_mx23() ? 0x0600 : 0x0900) + (n) * 0x10)
#define PINCTRL_DOE(n) ((cpu_is_mx23() ? 0x0700 : 0x0b00) + (n) * 0x10)
@@ -91,19 +88,19 @@ static int mxs_gpio_set_irq_type(struct irq_data *d, unsigned int type)
/* set level or edge */
pin_addr = port->base + PINCTRL_IRQLEV(port->id);
if (edge & GPIO_INT_LEV_MASK)
- writel(pin_mask, pin_addr + MXS_SET);
+ writel(pin_mask, pin_addr + MXS_SET_ADDR);
else
- writel(pin_mask, pin_addr + MXS_CLR);
+ writel(pin_mask, pin_addr + MXS_CLR_ADDR);

/* set polarity */
pin_addr = port->base + PINCTRL_IRQPOL(port->id);
if (edge & GPIO_INT_POL_MASK)
- writel(pin_mask, pin_addr + MXS_SET);
+ writel(pin_mask, pin_addr + MXS_SET_ADDR);
else
- writel(pin_mask, pin_addr + MXS_CLR);
+ writel(pin_mask, pin_addr + MXS_CLR_ADDR);

writel(1 << (gpio & 0x1f),
- port->base + PINCTRL_IRQSTAT(port->id) + MXS_CLR);
+ port->base + PINCTRL_IRQSTAT(port->id) + MXS_CLR_ADDR);

return 0;
}
@@ -164,7 +161,7 @@ static void __init mxs_gpio_init_gc(struct mxs_gpio_port *port)
ct->chip.irq_unmask = irq_gc_mask_set_bit;
ct->chip.irq_set_type = mxs_gpio_set_irq_type;
ct->chip.irq_set_wake = mxs_gpio_set_wake_irq;
- ct->regs.ack = PINCTRL_IRQSTAT(port->id) + MXS_CLR;
+ ct->regs.ack = PINCTRL_IRQSTAT(port->id) + MXS_CLR_ADDR;
ct->regs.mask = PINCTRL_IRQEN(port->id);

irq_setup_generic_chip(gc, IRQ_MSK(32), 0, IRQ_NOREQUEST, 0);
@@ -232,7 +229,7 @@ static int __devinit mxs_gpio_probe(struct platform_device *pdev)
writel(0, port->base + PINCTRL_IRQEN(port->id));

/* clear address has to be used to clear IRQSTAT bits */
- writel(~0U, port->base + PINCTRL_IRQSTAT(port->id) + MXS_CLR);
+ writel(~0U, port->base + PINCTRL_IRQSTAT(port->id) + MXS_CLR_ADDR);

/* gpio-mxs can be a generic irq chip */
mxs_gpio_init_gc(port);
--
1.7.0.4


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/