Commit 180c33ee authored by Dominik Brodowski's avatar Dominik Brodowski

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: default avatarDominik Brodowski <linux@dominikbrodowski.net>
parent 57197b9b
...@@ -283,8 +283,6 @@ void pcmcia_unregister_socket(struct pcmcia_socket *socket) ...@@ -283,8 +283,6 @@ void pcmcia_unregister_socket(struct pcmcia_socket *socket)
if (socket->thread) if (socket->thread)
kthread_stop(socket->thread); kthread_stop(socket->thread);
release_cis_mem(socket);
/* remove from our own list */ /* remove from our own list */
down_write(&pcmcia_socket_list_rwsem); down_write(&pcmcia_socket_list_rwsem);
list_del(&socket->socket_list); list_del(&socket->socket_list);
...@@ -399,7 +397,6 @@ static void socket_shutdown(struct pcmcia_socket *s) ...@@ -399,7 +397,6 @@ static void socket_shutdown(struct pcmcia_socket *s)
s->ops->set_socket(s, &s->socket); s->ops->set_socket(s, &s->socket);
s->irq.AssignedIRQ = s->irq.Config = 0; s->irq.AssignedIRQ = s->irq.Config = 0;
s->lock_count = 0; s->lock_count = 0;
destroy_cis_cache(s);
kfree(s->fake_cis); kfree(s->fake_cis);
s->fake_cis = NULL; s->fake_cis = NULL;
#ifdef CONFIG_CARDBUS #ifdef CONFIG_CARDBUS
......
...@@ -1241,10 +1241,12 @@ static int ds_event(struct pcmcia_socket *skt, event_t event, int priority) ...@@ -1241,10 +1241,12 @@ static int ds_event(struct pcmcia_socket *skt, event_t event, int priority)
s->pcmcia_state.present = 0; s->pcmcia_state.present = 0;
pcmcia_card_remove(skt, NULL); pcmcia_card_remove(skt, NULL);
handle_event(skt, event); handle_event(skt, event);
destroy_cis_cache(s);
break; break;
case CS_EVENT_CARD_INSERTION: case CS_EVENT_CARD_INSERTION:
s->pcmcia_state.present = 1; s->pcmcia_state.present = 1;
destroy_cis_cache(s); /* to be on the safe side... */
pcmcia_card_add(skt); pcmcia_card_add(skt);
handle_event(skt, event); handle_event(skt, event);
break; break;
...@@ -1366,6 +1368,7 @@ static void pcmcia_bus_remove_socket(struct device *dev, ...@@ -1366,6 +1368,7 @@ static void pcmcia_bus_remove_socket(struct device *dev,
/* unregister any unbound devices */ /* unregister any unbound devices */
mutex_lock(&socket->skt_mutex); mutex_lock(&socket->skt_mutex);
pcmcia_card_remove(socket, NULL); pcmcia_card_remove(socket, NULL);
release_cis_mem(socket);
mutex_unlock(&socket->skt_mutex); mutex_unlock(&socket->skt_mutex);
pcmcia_put_socket(socket); pcmcia_put_socket(socket);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment