summaryrefslogtreecommitdiffstats
path: root/drivers/mmc/core/core.c
diff options
context:
space:
mode:
authorChris Ball <cjb@laptop.org>2011-01-04 12:20:22 -0500
committerChris Ball <cjb@laptop.org>2011-01-08 23:52:25 -0500
commitc584179828b268152f5ff82dab529a2c095b09ac (patch)
tree5777a045ea9c8ea9d7d285c7258b56753ea23dd5 /drivers/mmc/core/core.c
parent807e8e40673d9628fa7dcdd14423424b4ee5f43b (diff)
downloadlinux-stable-c584179828b268152f5ff82dab529a2c095b09ac.tar.gz
linux-stable-c584179828b268152f5ff82dab529a2c095b09ac.tar.bz2
linux-stable-c584179828b268152f5ff82dab529a2c095b09ac.zip
mmc: Explain why we make adjacent mmc_bus_{put,get} calls during rescan.
Signed-off-by: Chris Ball <cjb@laptop.org>
Diffstat (limited to 'drivers/mmc/core/core.c')
-rw-r--r--drivers/mmc/core/core.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/mmc/core/core.c b/drivers/mmc/core/core.c
index 198f70bad908..4b1d8fb04e9b 100644
--- a/drivers/mmc/core/core.c
+++ b/drivers/mmc/core/core.c
@@ -1531,9 +1531,11 @@ void mmc_rescan(struct work_struct *work)
&& mmc_card_is_removable(host))
host->bus_ops->detect(host);
+ /*
+ * Let mmc_bus_put() free the bus/bus_ops if we've found that
+ * the card is no longer present.
+ */
mmc_bus_put(host);
-
-
mmc_bus_get(host);
/* if there still is a card present, stop here */