aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/pcmcia/cs.c12
-rw-r--r--include/pcmcia/ss.h1
2 files changed, 3 insertions, 10 deletions
diff --git a/drivers/pcmcia/cs.c b/drivers/pcmcia/cs.c
index 29276bd28295..6bb1bb5db9c4 100644
--- a/drivers/pcmcia/cs.c
+++ b/drivers/pcmcia/cs.c
@@ -238,7 +238,6 @@ int pcmcia_register_socket(struct pcmcia_socket *socket)
238 238
239 init_completion(&socket->socket_released); 239 init_completion(&socket->socket_released);
240 init_completion(&socket->thread_done); 240 init_completion(&socket->thread_done);
241 init_waitqueue_head(&socket->thread_wait);
242 mutex_init(&socket->skt_mutex); 241 mutex_init(&socket->skt_mutex);
243 spin_lock_init(&socket->thread_lock); 242 spin_lock_init(&socket->thread_lock);
244 243
@@ -278,10 +277,9 @@ void pcmcia_unregister_socket(struct pcmcia_socket *socket)
278 277
279 cs_dbg(socket, 0, "pcmcia_unregister_socket(0x%p)\n", socket->ops); 278 cs_dbg(socket, 0, "pcmcia_unregister_socket(0x%p)\n", socket->ops);
280 279
281 if (socket->thread) { 280 if (socket->thread)
282 wake_up(&socket->thread_wait);
283 kthread_stop(socket->thread); 281 kthread_stop(socket->thread);
284 } 282
285 release_cis_mem(socket); 283 release_cis_mem(socket);
286 284
287 /* remove from our own list */ 285 /* remove from our own list */
@@ -635,7 +633,6 @@ static void socket_detect_change(struct pcmcia_socket *skt)
635static int pccardd(void *__skt) 633static int pccardd(void *__skt)
636{ 634{
637 struct pcmcia_socket *skt = __skt; 635 struct pcmcia_socket *skt = __skt;
638 DECLARE_WAITQUEUE(wait, current);
639 int ret; 636 int ret;
640 637
641 skt->thread = current; 638 skt->thread = current;
@@ -656,7 +653,6 @@ static int pccardd(void *__skt)
656 if (ret) 653 if (ret)
657 dev_warn(&skt->dev, "err %d adding socket attributes\n", ret); 654 dev_warn(&skt->dev, "err %d adding socket attributes\n", ret);
658 655
659 add_wait_queue(&skt->thread_wait, &wait);
660 complete(&skt->thread_done); 656 complete(&skt->thread_done);
661 657
662 set_freezable(); 658 set_freezable();
@@ -694,8 +690,6 @@ static int pccardd(void *__skt)
694 /* make sure we are running before we exit */ 690 /* make sure we are running before we exit */
695 set_current_state(TASK_RUNNING); 691 set_current_state(TASK_RUNNING);
696 692
697 remove_wait_queue(&skt->thread_wait, &wait);
698
699 /* remove from the device core */ 693 /* remove from the device core */
700 pccard_sysfs_remove_socket(&skt->dev); 694 pccard_sysfs_remove_socket(&skt->dev);
701 device_unregister(&skt->dev); 695 device_unregister(&skt->dev);
@@ -716,7 +710,7 @@ void pcmcia_parse_events(struct pcmcia_socket *s, u_int events)
716 s->thread_events |= events; 710 s->thread_events |= events;
717 spin_unlock_irqrestore(&s->thread_lock, flags); 711 spin_unlock_irqrestore(&s->thread_lock, flags);
718 712
719 wake_up(&s->thread_wait); 713 wake_up_process(s->thread);
720 } 714 }
721} /* pcmcia_parse_events */ 715} /* pcmcia_parse_events */
722EXPORT_SYMBOL(pcmcia_parse_events); 716EXPORT_SYMBOL(pcmcia_parse_events);
diff --git a/include/pcmcia/ss.h b/include/pcmcia/ss.h
index f95dca077c1c..2edc7fa3bab3 100644
--- a/include/pcmcia/ss.h
+++ b/include/pcmcia/ss.h
@@ -245,7 +245,6 @@ struct pcmcia_socket {
245 245
246 struct task_struct *thread; 246 struct task_struct *thread;
247 struct completion thread_done; 247 struct completion thread_done;
248 wait_queue_head_t thread_wait;
249 spinlock_t thread_lock; /* protects thread_events */ 248 spinlock_t thread_lock; /* protects thread_events */
250 unsigned int thread_events; 249 unsigned int thread_events;
251 250