Skip to content

Commit

Permalink
pcmcia: limit pxa2xx_balloon3 subdriver to balloon3 platform
Browse files Browse the repository at this point in the history
pxa2xx_balloon3 tries to register pxa2xx-pcmcia device not checking whether
machine is really balloon3, thus messing multi-machine kernels. Fix it up.

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 Apr 12, 2011
1 parent a6d710f commit af21cbb
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions drivers/pcmcia/pxa2xx_balloon3.c
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@

#include <mach/balloon3.h>

#include <asm/mach-types.h>

#include "soc_common.h"

/*
Expand Down Expand Up @@ -127,6 +129,9 @@ static int __init balloon3_pcmcia_init(void)
{
int ret;

if (!machine_is_balloon3())
return -ENODEV;

balloon3_pcmcia_device = platform_device_alloc("pxa2xx-pcmcia", -1);
if (!balloon3_pcmcia_device)
return -ENOMEM;
Expand Down

0 comments on commit af21cbb

Please sign in to comment.