Hi, On Tue, Jan 04, 2011 at 01:29:02AM +0000, Chris Ball wrote: > Thanks! Pushed to mmc-next for .38, after adding Reviewed-by: tags and > removing the mmc_bus_{put,get}() comment, since I'll take care of that > separately. And here's the comment patch: From: Chris Ball <cjb@xxxxxxxxxx> Date: Tue, 4 Jan 2011 12:20:22 -0500 Subject: [PATCH] mmc: Explain why we make adjacent mmc_bus_{put,get} calls during rescan. Signed-off-by: Chris Ball <cjb@xxxxxxxxxx> --- drivers/mmc/core/core.c | 6 ++++-- 1 files changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/mmc/core/core.c b/drivers/mmc/core/core.c index 286e6ce..b8e3b97 100644 --- a/drivers/mmc/core/core.c +++ b/drivers/mmc/core/core.c @@ -1529,13 +1529,15 @@ void mmc_rescan(struct work_struct *work) */ if (host->bus_ops && host->bus_ops->detect && !host->bus_dead && 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 */ if (host->bus_ops != NULL) { mmc_bus_put(host); -- Chris Ball <cjb@xxxxxxxxxx> <http://printf.net/> One Laptop Per Child -- To unsubscribe from this list: send the line "unsubscribe linux-mmc" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html