diff options
Diffstat (limited to 'drivers/pcmcia/cs.c')
-rw-r--r-- | drivers/pcmcia/cs.c | 14 |
1 files changed, 3 insertions, 11 deletions
diff --git a/drivers/pcmcia/cs.c b/drivers/pcmcia/cs.c index 29276bd28295..d1207393fc3e 100644 --- a/drivers/pcmcia/cs.c +++ b/drivers/pcmcia/cs.c | |||
@@ -32,11 +32,9 @@ | |||
32 | #include <asm/system.h> | 32 | #include <asm/system.h> |
33 | #include <asm/irq.h> | 33 | #include <asm/irq.h> |
34 | 34 | ||
35 | #define IN_CARD_SERVICES | ||
36 | #include <pcmcia/cs_types.h> | 35 | #include <pcmcia/cs_types.h> |
37 | #include <pcmcia/ss.h> | 36 | #include <pcmcia/ss.h> |
38 | #include <pcmcia/cs.h> | 37 | #include <pcmcia/cs.h> |
39 | #include <pcmcia/bulkmem.h> | ||
40 | #include <pcmcia/cistpl.h> | 38 | #include <pcmcia/cistpl.h> |
41 | #include <pcmcia/cisreg.h> | 39 | #include <pcmcia/cisreg.h> |
42 | #include <pcmcia/ds.h> | 40 | #include <pcmcia/ds.h> |
@@ -238,7 +236,6 @@ int pcmcia_register_socket(struct pcmcia_socket *socket) | |||
238 | 236 | ||
239 | init_completion(&socket->socket_released); | 237 | init_completion(&socket->socket_released); |
240 | init_completion(&socket->thread_done); | 238 | init_completion(&socket->thread_done); |
241 | init_waitqueue_head(&socket->thread_wait); | ||
242 | mutex_init(&socket->skt_mutex); | 239 | mutex_init(&socket->skt_mutex); |
243 | spin_lock_init(&socket->thread_lock); | 240 | spin_lock_init(&socket->thread_lock); |
244 | 241 | ||
@@ -278,10 +275,9 @@ void pcmcia_unregister_socket(struct pcmcia_socket *socket) | |||
278 | 275 | ||
279 | cs_dbg(socket, 0, "pcmcia_unregister_socket(0x%p)\n", socket->ops); | 276 | cs_dbg(socket, 0, "pcmcia_unregister_socket(0x%p)\n", socket->ops); |
280 | 277 | ||
281 | if (socket->thread) { | 278 | if (socket->thread) |
282 | wake_up(&socket->thread_wait); | ||
283 | kthread_stop(socket->thread); | 279 | kthread_stop(socket->thread); |
284 | } | 280 | |
285 | release_cis_mem(socket); | 281 | release_cis_mem(socket); |
286 | 282 | ||
287 | /* remove from our own list */ | 283 | /* remove from our own list */ |
@@ -635,7 +631,6 @@ static void socket_detect_change(struct pcmcia_socket *skt) | |||
635 | static int pccardd(void *__skt) | 631 | static int pccardd(void *__skt) |
636 | { | 632 | { |
637 | struct pcmcia_socket *skt = __skt; | 633 | struct pcmcia_socket *skt = __skt; |
638 | DECLARE_WAITQUEUE(wait, current); | ||
639 | int ret; | 634 | int ret; |
640 | 635 | ||
641 | skt->thread = current; | 636 | skt->thread = current; |
@@ -656,7 +651,6 @@ static int pccardd(void *__skt) | |||
656 | if (ret) | 651 | if (ret) |
657 | dev_warn(&skt->dev, "err %d adding socket attributes\n", ret); | 652 | dev_warn(&skt->dev, "err %d adding socket attributes\n", ret); |
658 | 653 | ||
659 | add_wait_queue(&skt->thread_wait, &wait); | ||
660 | complete(&skt->thread_done); | 654 | complete(&skt->thread_done); |
661 | 655 | ||
662 | set_freezable(); | 656 | set_freezable(); |
@@ -694,8 +688,6 @@ static int pccardd(void *__skt) | |||
694 | /* make sure we are running before we exit */ | 688 | /* make sure we are running before we exit */ |
695 | set_current_state(TASK_RUNNING); | 689 | set_current_state(TASK_RUNNING); |
696 | 690 | ||
697 | remove_wait_queue(&skt->thread_wait, &wait); | ||
698 | |||
699 | /* remove from the device core */ | 691 | /* remove from the device core */ |
700 | pccard_sysfs_remove_socket(&skt->dev); | 692 | pccard_sysfs_remove_socket(&skt->dev); |
701 | device_unregister(&skt->dev); | 693 | device_unregister(&skt->dev); |
@@ -716,7 +708,7 @@ void pcmcia_parse_events(struct pcmcia_socket *s, u_int events) | |||
716 | s->thread_events |= events; | 708 | s->thread_events |= events; |
717 | spin_unlock_irqrestore(&s->thread_lock, flags); | 709 | spin_unlock_irqrestore(&s->thread_lock, flags); |
718 | 710 | ||
719 | wake_up(&s->thread_wait); | 711 | wake_up_process(s->thread); |
720 | } | 712 | } |
721 | } /* pcmcia_parse_events */ | 713 | } /* pcmcia_parse_events */ |
722 | EXPORT_SYMBOL(pcmcia_parse_events); | 714 | EXPORT_SYMBOL(pcmcia_parse_events); |