diff options
author | Dmitry Eremin-Solenikov <dbaryshkov@gmail.com> | 2011-02-23 02:30:28 +0300 |
---|---|---|
committer | Eric Miao <eric.y.miao@gmail.com> | 2011-02-27 21:38:23 +0800 |
commit | 8d9bd9002dc8c3a05e11c5f40d95d06e15e83f71 (patch) | |
tree | ddd70eee6d27d2d5b32ff31548a29069cd110476 /drivers/pcmcia | |
parent | 6767c5203459ebee1410e87450b32bf9f4488406 (diff) | |
download | talos-op-linux-8d9bd9002dc8c3a05e11c5f40d95d06e15e83f71.tar.gz talos-op-linux-8d9bd9002dc8c3a05e11c5f40d95d06e15e83f71.zip |
ARM: pxa/colibri: don't register pxa2xx-pcmcia nodes on non-colibri platforms
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>
Diffstat (limited to 'drivers/pcmcia')
-rw-r--r-- | drivers/pcmcia/pxa2xx_colibri.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/pcmcia/pxa2xx_colibri.c b/drivers/pcmcia/pxa2xx_colibri.c index c3f72192af66..a52039564e74 100644 --- a/drivers/pcmcia/pxa2xx_colibri.c +++ b/drivers/pcmcia/pxa2xx_colibri.c @@ -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; |