aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/pcmcia
diff options
context:
space:
mode:
authorDominik Brodowski <linux@dominikbrodowski.net>2010-01-02 11:34:09 -0500
committerDominik Brodowski <linux@dominikbrodowski.net>2010-01-17 12:30:49 -0500
commit180c33ee409eb3ed605d4ad9884e4a526a7655ff (patch)
tree0bb12fc08cc26eeef0deb51eb32372e791b0a896 /drivers/pcmcia
parent57197b9b7712eb19f5344c466e8aefbac1adbe55 (diff)
pcmcia: call CIS cleanup from ds.c
As ds.c is the only real user of CIS access functions, call the cleanup functions from ds.c, too. Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
Diffstat (limited to 'drivers/pcmcia')
-rw-r--r--drivers/pcmcia/cs.c3
-rw-r--r--drivers/pcmcia/ds.c3
2 files changed, 3 insertions, 3 deletions
diff --git a/drivers/pcmcia/cs.c b/drivers/pcmcia/cs.c
index 8c51493d1f95..9d8b9c1f5a69 100644
--- a/drivers/pcmcia/cs.c
+++ b/drivers/pcmcia/cs.c
@@ -283,8 +283,6 @@ void pcmcia_unregister_socket(struct pcmcia_socket *socket)
283 if (socket->thread) 283 if (socket->thread)
284 kthread_stop(socket->thread); 284 kthread_stop(socket->thread);
285 285
286 release_cis_mem(socket);
287
288 /* remove from our own list */ 286 /* remove from our own list */
289 down_write(&pcmcia_socket_list_rwsem); 287 down_write(&pcmcia_socket_list_rwsem);
290 list_del(&socket->socket_list); 288 list_del(&socket->socket_list);
@@ -399,7 +397,6 @@ static void socket_shutdown(struct pcmcia_socket *s)
399 s->ops->set_socket(s, &s->socket); 397 s->ops->set_socket(s, &s->socket);
400 s->irq.AssignedIRQ = s->irq.Config = 0; 398 s->irq.AssignedIRQ = s->irq.Config = 0;
401 s->lock_count = 0; 399 s->lock_count = 0;
402 destroy_cis_cache(s);
403 kfree(s->fake_cis); 400 kfree(s->fake_cis);
404 s->fake_cis = NULL; 401 s->fake_cis = NULL;
405#ifdef CONFIG_CARDBUS 402#ifdef CONFIG_CARDBUS
diff --git a/drivers/pcmcia/ds.c b/drivers/pcmcia/ds.c
index 87e06395c129..7bb52b003f0e 100644
--- a/drivers/pcmcia/ds.c
+++ b/drivers/pcmcia/ds.c
@@ -1241,10 +1241,12 @@ static int ds_event(struct pcmcia_socket *skt, event_t event, int priority)
1241 s->pcmcia_state.present = 0; 1241 s->pcmcia_state.present = 0;
1242 pcmcia_card_remove(skt, NULL); 1242 pcmcia_card_remove(skt, NULL);
1243 handle_event(skt, event); 1243 handle_event(skt, event);
1244 destroy_cis_cache(s);
1244 break; 1245 break;
1245 1246
1246 case CS_EVENT_CARD_INSERTION: 1247 case CS_EVENT_CARD_INSERTION:
1247 s->pcmcia_state.present = 1; 1248 s->pcmcia_state.present = 1;
1249 destroy_cis_cache(s); /* to be on the safe side... */
1248 pcmcia_card_add(skt); 1250 pcmcia_card_add(skt);
1249 handle_event(skt, event); 1251 handle_event(skt, event);
1250 break; 1252 break;
@@ -1366,6 +1368,7 @@ static void pcmcia_bus_remove_socket(struct device *dev,
1366 /* unregister any unbound devices */ 1368 /* unregister any unbound devices */
1367 mutex_lock(&socket->skt_mutex); 1369 mutex_lock(&socket->skt_mutex);
1368 pcmcia_card_remove(socket, NULL); 1370 pcmcia_card_remove(socket, NULL);
1371 release_cis_mem(socket);
1369 mutex_unlock(&socket->skt_mutex); 1372 mutex_unlock(&socket->skt_mutex);
1370 1373
1371 pcmcia_put_socket(socket); 1374 pcmcia_put_socket(socket);