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>
This commit is contained in:
parent
6767c52034
commit
8d9bd9002d
1 changed files with 3 additions and 0 deletions
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue