From: Pierre Ossman Date: Wed, 11 Jul 2007 18:28:02 +0000 (+0200) Subject: mmc: add a might_sleep() to mmc_claim_host() X-Git-Tag: v2.6.23-rc2~189^2~6 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=cf795bfb3ad4e2f8f6bb346aa8edb8272d4c70a2;p=linux-2.6-omap-h63xx.git mmc: add a might_sleep() to mmc_claim_host() In the normal case, the host lock can be claimed directly. When it cannot, the caller will sleep. Make sure we don't have any latent bugs by always calling might_sleep(). Signed-off-by: Pierre Ossman --- diff --git a/drivers/mmc/core/core.c b/drivers/mmc/core/core.c index e08aa352bd5..3208890b10b 100644 --- a/drivers/mmc/core/core.c +++ b/drivers/mmc/core/core.c @@ -260,6 +260,8 @@ void mmc_claim_host(struct mmc_host *host) DECLARE_WAITQUEUE(wait, current); unsigned long flags; + might_sleep(); + add_wait_queue(&host->wq, &wait); spin_lock_irqsave(&host->lock, flags); while (1) {