From: Daniel Ritz Date: Sat, 25 Nov 2006 19:09:17 +0000 (-0800) Subject: [PATCH] fix "pcmcia: fix 'rmmod pcmcia' with unbound devices" X-Git-Tag: v2.6.19~46 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=8e4d9dcb4205dd43c4297168022ed0c6874fb918;p=linux-2.6-omap-h63xx.git [PATCH] fix "pcmcia: fix 'rmmod pcmcia' with unbound devices" Add required locking to dfbc9e9d33adb1ac9910dd7f8ceb911947039a52 Signed-off-by: Daniel Ritz Cc: 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 a20d84d707d..21d83a895b2 100644 --- a/drivers/pcmcia/ds.c +++ b/drivers/pcmcia/ds.c @@ -1272,7 +1272,9 @@ static void pcmcia_bus_remove_socket(struct class_device *class_dev, pccard_register_pcmcia(socket, NULL); /* unregister any unbound devices */ + mutex_lock(&socket->skt_mutex); pcmcia_card_remove(socket, NULL); + mutex_unlock(&socket->skt_mutex); pcmcia_put_socket(socket);