diff options
author | Pierre Ossman <drzeus@drzeus.cx> | 2007-04-28 10:52:12 -0400 |
---|---|---|
committer | Pierre Ossman <drzeus@drzeus.cx> | 2007-05-01 07:04:17 -0400 |
commit | d2b46f66b4b342be07a4194bd5e82384d07e470d (patch) | |
tree | f65f8147e6e338d271ea0d5502cacc31190d06fe /drivers/mmc/card | |
parent | 3b91e5507cddaca53bccf1524ff11a0ac5c85531 (diff) |
mmc: allow suspended block driver to be removed
Make sure we don't deadlock when removing a suspended block
queue, something that might happen if the card is removed during
suspend.
Signed-off-by: Pierre Ossman <drzeus@drzeus.cx>
Diffstat (limited to 'drivers/mmc/card')
-rw-r--r-- | drivers/mmc/card/queue.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/mmc/card/queue.c b/drivers/mmc/card/queue.c index aa75ac11a19e..2e77963db334 100644 --- a/drivers/mmc/card/queue.c +++ b/drivers/mmc/card/queue.c | |||
@@ -191,6 +191,9 @@ void mmc_cleanup_queue(struct mmc_queue *mq) | |||
191 | q->queuedata = NULL; | 191 | q->queuedata = NULL; |
192 | spin_unlock_irqrestore(q->queue_lock, flags); | 192 | spin_unlock_irqrestore(q->queue_lock, flags); |
193 | 193 | ||
194 | /* Make sure the queue isn't suspended, as that will deadlock */ | ||
195 | mmc_queue_resume(mq); | ||
196 | |||
194 | /* Then terminate our worker thread */ | 197 | /* Then terminate our worker thread */ |
195 | kthread_stop(mq->thread); | 198 | kthread_stop(mq->thread); |
196 | 199 | ||