Commit 735443fede138fbbad062ec258e4d49648a0a56d

Authored by Dmitry Eremin-Solenikov
Committed by Eric Miao
1 parent af21cbb1ef

pcmcia: limit pxa2xx_trizeps4 subdriver to trizeps4 platform

pxa2xx_trizeps4 tries to register pxa2xx-pcmcia device not checking whether
machine is really trizeps4, 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>

Showing 1 changed file with 3 additions and 0 deletions Side-by-side Diff

drivers/pcmcia/pxa2xx_trizeps4.c
... ... @@ -226,6 +226,9 @@
226 226 {
227 227 int ret;
228 228  
  229 + if (!machine_is_trizeps4() && !machine_is_trizeps4wl())
  230 + return -ENODEV;
  231 +
229 232 trizeps_pcmcia_device = platform_device_alloc("pxa2xx-pcmcia", -1);
230 233 if (!trizeps_pcmcia_device)
231 234 return -ENOMEM;