Skip to content

Commit

Permalink
ARM: pxa/colibri: don't register pxa2xx-pcmcia nodes on non-colibri p…
Browse files Browse the repository at this point in the history
…latforms

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>
  • Loading branch information
Dmitry Eremin-Solenikov authored and Eric Miao committed Feb 27, 2011
1 parent 6767c52 commit 8d9bd90
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions drivers/pcmcia/pxa2xx_colibri.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 8d9bd90

Please sign in to comment.