summaryrefslogtreecommitdiffstats
path: root/drivers/pcmcia
diff options
context:
space:
mode:
authorDmitry Eremin-Solenikov <dbaryshkov@gmail.com>2011-04-01 11:28:46 +0200
committerEric Miao <eric.y.miao@gmail.com>2011-04-12 17:07:42 +0200
commit735443fede138fbbad062ec258e4d49648a0a56d (patch)
treeae3c787dab7affffcf57fc4a6d24869b0b2a538b /drivers/pcmcia
parentpcmcia: limit pxa2xx_balloon3 subdriver to balloon3 platform (diff)
downloadlinux-735443fede138fbbad062ec258e4d49648a0a56d.tar.xz
linux-735443fede138fbbad062ec258e4d49648a0a56d.zip
pcmcia: limit pxa2xx_trizeps4 subdriver to trizeps4 platform
pxa2xx_trizeps4 tries to register pxa2xx-pcmcia device not checking whether machine is really trizeps4, 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_trizeps4.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/pcmcia/pxa2xx_trizeps4.c b/drivers/pcmcia/pxa2xx_trizeps4.c
index b7e596620db1..5bb4e1a94d25 100644
--- a/drivers/pcmcia/pxa2xx_trizeps4.c
+++ b/drivers/pcmcia/pxa2xx_trizeps4.c
@@ -226,6 +226,9 @@ static int __init trizeps_pcmcia_init(void)
{
int ret;
+ if (!machine_is_trizeps4() && !machine_is_trizeps4wl())
+ return -ENODEV;
+
trizeps_pcmcia_device = platform_device_alloc("pxa2xx-pcmcia", -1);
if (!trizeps_pcmcia_device)
return -ENOMEM;