if (socket->thread)
kthread_stop(socket->thread);
- release_cis_mem(socket);
-
/* remove from our own list */
down_write(&pcmcia_socket_list_rwsem);
list_del(&socket->socket_list);
s->ops->set_socket(s, &s->socket);
s->irq.AssignedIRQ = s->irq.Config = 0;
s->lock_count = 0;
- destroy_cis_cache(s);
kfree(s->fake_cis);
s->fake_cis = NULL;
#ifdef CONFIG_CARDBUS
s->pcmcia_state.present = 0;
pcmcia_card_remove(skt, NULL);
handle_event(skt, event);
+ destroy_cis_cache(s);
break;
case CS_EVENT_CARD_INSERTION:
s->pcmcia_state.present = 1;
+ destroy_cis_cache(s); /* to be on the safe side... */
pcmcia_card_add(skt);
handle_event(skt, event);
break;
/* unregister any unbound devices */
mutex_lock(&socket->skt_mutex);
pcmcia_card_remove(socket, NULL);
+ release_cis_mem(socket);
mutex_unlock(&socket->skt_mutex);
pcmcia_put_socket(socket);