lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <1321350910-8685-1-git-send-email-dong.aisheng@linaro.org>
Date:	Tue, 15 Nov 2011 17:55:10 +0800
From:	Dong Aisheng <dong.aisheng@...aro.org>
To:	<linux-kernel@...r.kernel.org>
CC:	<grant.likely@...retlab.ca>, <arnd@...db.de>,
	<s.hauer@...gutronix.de>, <shawn.guo@...escale.com>,
	<kernel@...gutronix.de>
Subject: [PATCH 1/1] gpio: gpio-mxs: remove the duplicated micro define

Signed-off-by: Dong Aisheng <dong.aisheng@...aro.org>
Cc: Grant Likely <grant.likely@...retlab.ca>
Cc: Arnd Bergmann <arnd@...db.de>
Cc: Sascha Hauer <s.hauer@...gutronix.de>
Cc: Shawn Guo <shawn.guo@...escale.com>
---
 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@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ