diff options
author | Pierre Ossman <drzeus@drzeus.cx> | 2007-07-11 14:28:02 -0400 |
---|---|---|
committer | Pierre Ossman <drzeus@drzeus.cx> | 2007-07-25 19:53:48 -0400 |
commit | cf795bfb3ad4e2f8f6bb346aa8edb8272d4c70a2 (patch) | |
tree | ccba2e6023d9f6da894d68ac21a06188e79495d6 /drivers/mmc | |
parent | 67a61c484735de9bf4f099830ecb4ef2eca95c38 (diff) |
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 <drzeus@drzeus.cx>
Diffstat (limited to 'drivers/mmc')
-rw-r--r-- | drivers/mmc/core/core.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/mmc/core/core.c b/drivers/mmc/core/core.c index e08aa352bd50..3208890b10b3 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) | |||
260 | DECLARE_WAITQUEUE(wait, current); | 260 | DECLARE_WAITQUEUE(wait, current); |
261 | unsigned long flags; | 261 | unsigned long flags; |
262 | 262 | ||
263 | might_sleep(); | ||
264 | |||
263 | add_wait_queue(&host->wq, &wait); | 265 | add_wait_queue(&host->wq, &wait); |
264 | spin_lock_irqsave(&host->lock, flags); | 266 | spin_lock_irqsave(&host->lock, flags); |
265 | while (1) { | 267 | while (1) { |