From: Chris Ball Date: Tue, 4 Jan 2011 17:20:22 +0000 (-0500) Subject: mmc: Explain why we make adjacent mmc_bus_{put,get} calls during rescan. X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=c584179828b268152f5ff82dab529a2c095b09ac;p=mv-sheeva.git mmc: Explain why we make adjacent mmc_bus_{put,get} calls during rescan. Signed-off-by: Chris Ball --- diff --git a/drivers/mmc/core/core.c b/drivers/mmc/core/core.c index 198f70bad90..4b1d8fb04e9 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 */