]> git.karo-electronics.de Git - linux-beck.git/commitdiff
pcmcia: limit pxa2xx_balloon3 subdriver to balloon3 platform
authorDmitry Eremin-Solenikov <dbaryshkov@gmail.com>
Fri, 1 Apr 2011 09:28:45 +0000 (13:28 +0400)
committerEric Miao <eric.y.miao@gmail.com>
Tue, 12 Apr 2011 15:07:42 +0000 (23:07 +0800)
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>
drivers/pcmcia/pxa2xx_balloon3.c

index 453c54c97612833b341a1e9787d9a8d51c7ec223..4c3e94c0ae85336a9fcee6511d570e1ab4b058e5 100644 (file)
@@ -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;