Commit a7a5ac58df0832daf7774b083c33032a7d26c792

Authored by Marc Zyngier
Committed by Russell King
1 parent d93626e861

PCMCIA: fix pxa2xx_lubbock modular build error

Commit d0d26c33b63c7ec10c3fdf9c7ce0aa035f0b3200 broke the driver by
propagating a pointer to the platform_device where a pointer to the
generic device was expected, leading to a spectacular crash...

Signed-off-by: Marc Zyngier <maz@misterjones.org>
Acked-by: Dominik Brodowski <linux@dominikbrodowski.net>
Acked-by: Eric Miao <eric.y.miao@gmail.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>

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

drivers/pcmcia/pxa2xx_base.c
... ... @@ -291,7 +291,7 @@
291 291 skt->nr = ops->first + i;
292 292 skt->ops = ops;
293 293 skt->socket.owner = ops->owner;
294   - skt->socket.dev.parent = dev;
  294 + skt->socket.dev.parent = &dev->dev;
295 295 skt->socket.pci_irq = NO_IRQ;
296 296  
297 297 ret = pxa2xx_drv_pcmcia_add_one(skt);
... ... @@ -304,8 +304,8 @@
304 304 soc_pcmcia_remove_one(&sinfo->skt[i]);
305 305 kfree(sinfo);
306 306 } else {
307   - pxa2xx_configure_sockets(dev);
308   - dev_set_drvdata(dev, sinfo);
  307 + pxa2xx_configure_sockets(&dev->dev);
  308 + dev_set_drvdata(&dev->dev, sinfo);
309 309 }
310 310  
311 311 return ret;