summaryrefslogtreecommitdiff
path: root/drivers/pcmcia
diff options
context:
space:
mode:
authorDmitry Eremin-Solenikov <dbaryshkov@gmail.com>2011-04-01 09:28:45 (GMT)
committerEric Miao <eric.y.miao@gmail.com>2011-04-12 15:07:42 (GMT)
commitaf21cbb1ef6aa366fcb629ea4d4330300ba22de7 (patch)
treeb7af8edd2585d49dbb5e7916fc50c60dc9a3160b /drivers/pcmcia
parenta6d710fefd1b2c209353a452d0f4c831b3af0da0 (diff)
downloadlinux-fsl-qoriq-af21cbb1ef6aa366fcb629ea4d4330300ba22de7.tar.xz
pcmcia: limit pxa2xx_balloon3 subdriver to balloon3 platform
pxa2xx_balloon3 tries to register pxa2xx-pcmcia device not checking whether machine is really balloon3, thus messing multi-machine kernels. Fix it up. Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com> Signed-off-by: Eric Miao <eric.y.miao@gmail.com>
Diffstat (limited to 'drivers/pcmcia')
-rw-r--r--drivers/pcmcia/pxa2xx_balloon3.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/pcmcia/pxa2xx_balloon3.c b/drivers/pcmcia/pxa2xx_balloon3.c
index 453c54c..4c3e94c 100644
--- a/drivers/pcmcia/pxa2xx_balloon3.c
+++ b/drivers/pcmcia/pxa2xx_balloon3.c
@@ -25,6 +25,8 @@
#include <mach/balloon3.h>
+#include <asm/mach-types.h>
+
#include "soc_common.h"
/*
@@ -127,6 +129,9 @@ static int __init balloon3_pcmcia_init(void)
{
int ret;
+ if (!machine_is_balloon3())
+ return -ENODEV;
+
balloon3_pcmcia_device = platform_device_alloc("pxa2xx-pcmcia", -1);
if (!balloon3_pcmcia_device)
return -ENOMEM;