1
0
Fork 0

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>
hifive-unleashed-5.1
Dmitry Eremin-Solenikov 2011-02-23 02:30:28 +03:00 committed by Eric Miao
parent 6767c52034
commit 8d9bd9002d
1 changed files with 3 additions and 0 deletions

View 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;