projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
67a61c4
)
mmc: add a might_sleep() to mmc_claim_host()
author
Pierre Ossman
<drzeus@drzeus.cx>
Wed, 11 Jul 2007 18:28:02 +0000
(20:28 +0200)
committer
Pierre Ossman
<drzeus@drzeus.cx>
Wed, 25 Jul 2007 23:53:48 +0000
(
01:53
+0200)
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>
drivers/mmc/core/core.c
patch
|
blob
|
history
diff --git
a/drivers/mmc/core/core.c
b/drivers/mmc/core/core.c
index e08aa352bd5066b9fc2831c48d97844b705c0b95..3208890b10b389afd8cf08e5874cc865a1a9e817 100644
(file)
--- 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) {