]> git.karo-electronics.de Git - mv-sheeva.git/commitdiff
ARM: pxa/colibri: don't register pxa2xx-pcmcia nodes on non-colibri platforms
authorDmitry Eremin-Solenikov <dbaryshkov@gmail.com>
Tue, 22 Feb 2011 23:30:28 +0000 (02:30 +0300)
committerEric Miao <eric.y.miao@gmail.com>
Sun, 27 Feb 2011 13:38:23 +0000 (21:38 +0800)
PXA supports multi-machine kernels since long ago. However a kernel
compiled with support for colibri and any other PXA machine and with
PCMCIA enabled will barf at runtime about duplicate registration of
pxa2xx-pcmcia device. Fix that.

Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
Signed-off-by: Eric Miao <eric.y.miao@gmail.com>
drivers/pcmcia/pxa2xx_colibri.c

index c3f72192af66e1fd67c7a69dc9faa0cdd2ef65df..a52039564e74b1ec07da8fe98e4b447aaf4499ce 100644 (file)
@@ -181,6 +181,9 @@ static int __init colibri_pcmcia_init(void)
 {
        int ret;
 
+       if (!machine_is_colibri() && !machine_is_colibri320())
+               return -ENODEV;
+
        colibri_pcmcia_device = platform_device_alloc("pxa2xx-pcmcia", -1);
        if (!colibri_pcmcia_device)
                return -ENOMEM;