summaryrefslogtreecommitdiffstats
path: root/drivers/gpio/gpio-mxs.c
diff options
context:
space:
mode:
authorShawn Guo <shawn.guo@linaro.org>2011-08-13 18:14:06 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2011-08-17 08:33:02 +0200
commit7e6c53aac38eec4e7bca1e4e9a5a6d7e45b30784 (patch)
treeb7d4e55bd78f9d7d9cd7279a4a10f2b9ca29a9f3 /drivers/gpio/gpio-mxs.c
parentarm/mxc: move IMX_GPIO_NR into mach/hardware.h (diff)
downloadlinux-7e6c53aac38eec4e7bca1e4e9a5a6d7e45b30784.tar.xz
linux-7e6c53aac38eec4e7bca1e4e9a5a6d7e45b30784.zip
gpio/mxs: move irq_to_gpio() into gpio-mxs driver
As irq_to_gpio() is only being used by gpio-mxs driver, it should be moved from mach/gpio.h into gpio-mxs.c. Signed-off-by: Shawn Guo <shawn.guo@linaro.org> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'drivers/gpio/gpio-mxs.c')
-rw-r--r--drivers/gpio/gpio-mxs.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/gpio/gpio-mxs.c b/drivers/gpio/gpio-mxs.c
index af55a8577c2e..292b50481db9 100644
--- a/drivers/gpio/gpio-mxs.c
+++ b/drivers/gpio/gpio-mxs.c
@@ -49,6 +49,8 @@
#define GPIO_INT_LEV_MASK (1 << 0)
#define GPIO_INT_POL_MASK (1 << 1)
+#define irq_to_gpio(irq) ((irq) - MXS_GPIO_IRQ_START)
+
struct mxs_gpio_port {
void __iomem *base;
int id;