aboutsummaryrefslogtreecommitdiff
path: root/arch/arm/mach-imx/mach-apf9328.c
diff options
context:
space:
mode:
authorShawn Guo <shawn.guo@linaro.org>2011-12-05 10:12:28 +0800
committerShawn Guo <shawn.guo@linaro.org>2012-07-01 21:57:16 +0800
commit438196c371cb32f0eacaf2a44166d9a0cf37c4a8 (patch)
tree8e502f38302ba1226444c73aaa84aae86464583f /arch/arm/mach-imx/mach-apf9328.c
parented175343b4b53d686e30b1e37fb94e142f56fa2f (diff)
ARM: imx: eliminate macro IRQ_GPIOx()
This patch changes all the static gpio irq number assigning with IRQ_GPIOA() ... IRQ_GPIOF() to run-time assigning with gpio_to_irq call, and in turn eliminates these macros. Signed-off-by: Shawn Guo <shawn.guo@linaro.org> Acked-by: Sascha Hauer <s.hauer@pengutronix.de> Acked-by: Dong Aisheng <dong.aisheng@linaro.org>
Diffstat (limited to 'arch/arm/mach-imx/mach-apf9328.c')
-rw-r--r--arch/arm/mach-imx/mach-apf9328.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/arch/arm/mach-imx/mach-apf9328.c b/arch/arm/mach-imx/mach-apf9328.c
index f4a63ee9e21..5062fcb8849 100644
--- a/arch/arm/mach-imx/mach-apf9328.c
+++ b/arch/arm/mach-imx/mach-apf9328.c
@@ -18,6 +18,7 @@
#include <linux/platform_device.h>
#include <linux/mtd/physmap.h>
#include <linux/dm9000.h>
+#include <linux/gpio.h>
#include <linux/i2c.h>
#include <asm/mach-types.h>
@@ -87,8 +88,7 @@ static struct resource dm9000_resources[] = {
.end = MX1_CS4_PHYS + 0x00C00003,
.flags = IORESOURCE_MEM,
}, {
- .start = IRQ_GPIOB(14),
- .end = IRQ_GPIOB(14),
+ /* irq number is run-time assigned */
.flags = IORESOURCE_IRQ | IORESOURCE_IRQ_LOWLEVEL,
},
};
@@ -129,6 +129,8 @@ static void __init apf9328_init(void)
imx1_add_imx_i2c(&apf9328_i2c_data);
+ dm9000_resources[2].start = gpio_to_irq(IMX_GPIO_NR(2, 14));
+ dm9000_resources[2].end = gpio_to_irq(IMX_GPIO_NR(2, 14));
platform_add_devices(devices, ARRAY_SIZE(devices));
}