[PATCH] pcmcia: fix task state at pccard thread exit

The pccardd thread has a race in it that it can shutdown in the
TASK_INTERRUPTIBLE state.

Make sure we mark ourselves runnable again as we remove ourselves from
the wait queue.

Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
diff --git a/drivers/pcmcia/cs.c b/drivers/pcmcia/cs.c
index fabd352..d5e7642 100644
--- a/drivers/pcmcia/cs.c
+++ b/drivers/pcmcia/cs.c
@@ -689,6 +689,9 @@
 		schedule();
 		try_to_freeze();
 	}
+	/* make sure we are running before we exit */
+	set_current_state(TASK_RUNNING);
+
 	remove_wait_queue(&skt->thread_wait, &wait);
 
 	/* remove from the device core */