diff options
author | Russell King <rmk@dyn-67.arm.linux.org.uk> | 2008-04-24 10:23:25 -0400 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2008-06-02 08:49:15 -0400 |
commit | 04ba0f656f7580d8a51a5b3441e088309141b67a (patch) | |
tree | 47a35af9f03930c3308d8e0112b1e7d41b3bb189 /drivers/pcmcia/pxa2xx_cm_x270.c | |
parent | 720046de27ec2a96d4497dbca8ee98657efa059c (diff) |
[ARM] pxa: avoid registering multiple pxa2xx_pcmcia devices
cm_x270 and mainstone both register their PCMCIA devices using the same
name, resulting in a warning message from the kernel. Avoid this by
making the cm_x270 and mainstone PCMCIA initialisation conditional on
the machine type we're running on.
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'drivers/pcmcia/pxa2xx_cm_x270.c')
-rw-r--r-- | drivers/pcmcia/pxa2xx_cm_x270.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/pcmcia/pxa2xx_cm_x270.c b/drivers/pcmcia/pxa2xx_cm_x270.c index e7ab060ff118..4a6c020afb37 100644 --- a/drivers/pcmcia/pxa2xx_cm_x270.c +++ b/drivers/pcmcia/pxa2xx_cm_x270.c | |||
@@ -18,6 +18,7 @@ | |||
18 | 18 | ||
19 | #include <pcmcia/ss.h> | 19 | #include <pcmcia/ss.h> |
20 | #include <asm/hardware.h> | 20 | #include <asm/hardware.h> |
21 | #include <asm/mach-types.h> | ||
21 | 22 | ||
22 | #include <asm/arch/pxa-regs.h> | 23 | #include <asm/arch/pxa-regs.h> |
23 | #include <asm/arch/pxa2xx-gpio.h> | 24 | #include <asm/arch/pxa2xx-gpio.h> |
@@ -147,6 +148,9 @@ static int __init cmx270_pcmcia_init(void) | |||
147 | { | 148 | { |
148 | int ret; | 149 | int ret; |
149 | 150 | ||
151 | if (!machine_is_armcore()) | ||
152 | return -ENODEV; | ||
153 | |||
150 | cmx270_pcmcia_device = platform_device_alloc("pxa2xx-pcmcia", -1); | 154 | cmx270_pcmcia_device = platform_device_alloc("pxa2xx-pcmcia", -1); |
151 | 155 | ||
152 | if (!cmx270_pcmcia_device) | 156 | if (!cmx270_pcmcia_device) |