]> git.karo-electronics.de Git - karo-tx-linux.git/commit
pcmcia: Fix broken abuse of dev->driver_data
authorAlan Cox <alan@redhat.com>
Thu, 2 Oct 2008 07:53:38 +0000 (09:53 +0200)
committerGreg Kroah-Hartman <gregkh@suse.de>
Thu, 9 Oct 2008 03:23:06 +0000 (20:23 -0700)
commit400f9f32043fbec8fc8de42fd9b9428b4557b19c
treef5201fdbdc098779f19edf1a25a32478eacd6165
parentbc3ac469af00b0e5b7799c127d00b6650fab5587
pcmcia: Fix broken abuse of dev->driver_data

[ Upstream commit: cec5eb7be3a104fffd27ca967ee8e15a123050e2 ]

PCMCIA abuses dev->private_data in the probe methods. Unfortunately it
continues to abuse it after calling drv->probe() which leads to crashes and
other nasties (such as bogus probes of multifunction devices) giving errors like

pcmcia: registering new device pcmcia0.1
kernel: 0.1: GetNextTuple: No more items

Extract the passed data before calling the driver probe function that way
we don't blow up when the driver reuses dev->private_data as its right.

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/pcmcia/ds.c