summaryrefslogtreecommitdiffstats
path: root/drivers/pcmcia
diff options
context:
space:
mode:
authorDaniel Ritz <daniel.ritz-ml@swissonline.ch>2006-11-18 22:19:34 -0800
committerLinus Torvalds <torvalds@woody.osdl.org>2006-11-20 09:42:05 -0800
commitdfbc9e9d33adb1ac9910dd7f8ceb911947039a52 (patch)
tree755da8c537361af066b5072c43f32aa4384b62bf /drivers/pcmcia
parent610a5b742e9df4e59047f22d13d8bd83cafce388 (diff)
downloadlinux-dfbc9e9d33adb1ac9910dd7f8ceb911947039a52.tar.bz2
[PATCH] pcmcia: fix 'rmmod pcmcia' with unbound devices
Having unbound PCMCIA devices: doing a 'find /sys' after a 'rmmod pcmcia' gives an oops because the pcmcia_device is not unregisterd from the driver core. fixes bugzilla #7481 Signed-off-by: Daniel Ritz <daniel.ritz@gmx.ch> Dominik Brodowski <linux@dominikbrodowski.net> Cc: Pavol Gono <Palo.Gono@gmail.com> Cc: <stable@kernel.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers/pcmcia')
-rw-r--r--drivers/pcmcia/ds.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/pcmcia/ds.c b/drivers/pcmcia/ds.c
index 0f701921c13e..a20d84d707d9 100644
--- a/drivers/pcmcia/ds.c
+++ b/drivers/pcmcia/ds.c
@@ -1271,6 +1271,9 @@ static void pcmcia_bus_remove_socket(struct class_device *class_dev,
socket->pcmcia_state.dead = 1;
pccard_register_pcmcia(socket, NULL);
+ /* unregister any unbound devices */
+ pcmcia_card_remove(socket, NULL);
+
pcmcia_put_socket(socket);
return;