summaryrefslogtreecommitdiffstats
path: root/drivers/pcmcia/pxa2xx_mainstone.c
diff options
context:
space:
mode:
authorRussell King2008-04-24 16:23:25 +0200
committerRussell King2008-06-02 14:49:15 +0200
commit04ba0f656f7580d8a51a5b3441e088309141b67a (patch)
tree47a35af9f03930c3308d8e0112b1e7d41b3bb189 /drivers/pcmcia/pxa2xx_mainstone.c
parent[ARM] pxa: don't register lpd270 cpld_irq sysdev if !lpd270 (diff)
downloadkernel-qcow2-linux-04ba0f656f7580d8a51a5b3441e088309141b67a.tar.gz
kernel-qcow2-linux-04ba0f656f7580d8a51a5b3441e088309141b67a.tar.xz
kernel-qcow2-linux-04ba0f656f7580d8a51a5b3441e088309141b67a.zip
[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_mainstone.c')
-rw-r--r--drivers/pcmcia/pxa2xx_mainstone.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/pcmcia/pxa2xx_mainstone.c b/drivers/pcmcia/pxa2xx_mainstone.c
index 145b85e0f02c..36a59960b5af 100644
--- a/drivers/pcmcia/pxa2xx_mainstone.c
+++ b/drivers/pcmcia/pxa2xx_mainstone.c
@@ -22,6 +22,7 @@
#include <pcmcia/ss.h>
#include <asm/hardware.h>
+#include <asm/mach-types.h>
#include <asm/irq.h>
#include <asm/arch/pxa-regs.h>
@@ -153,6 +154,9 @@ static int __init mst_pcmcia_init(void)
{
int ret;
+ if (!machine_is_mainstone())
+ return -ENODEV;
+
mst_pcmcia_device = platform_device_alloc("pxa2xx-pcmcia", -1);
if (!mst_pcmcia_device)
return -ENOMEM;