From: Daniel Ritz Date: Sun, 19 Nov 2006 06:19:34 +0000 (-0800) Subject: [PATCH] pcmcia: fix 'rmmod pcmcia' with unbound devices X-Git-Tag: v2.6.19~70 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=dfbc9e9d33adb1ac9910dd7f8ceb911947039a52;p=linux-2.6 [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 Dominik Brodowski Cc: Pavol Gono Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/drivers/pcmcia/ds.c b/drivers/pcmcia/ds.c index 0f701921c1..a20d84d707 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;