From 8f39568c53a820094959a79b4c039afada2e9ad4 Mon Sep 17 00:00:00 2001 From: Subhash Jadavani Date: Fri, 7 Aug 2015 20:21:20 -0700 Subject: [PATCH] mmc: core: remove shutdown handler If mmc/sd shutdown callback suspends the card when card's runtime PM status is still set to "runtime active" then any request issued after mmc/sd shutdown will not resume the card hence we will end up issuing the request to host driver while card isn't in a state to handle it. Right way to fix this issue is not to allow any requests to flow in after the shutdown callback has executed. Until it is fixed in the right way, we are disabling the shutdown handling as it anyways doesn't do real useful things. Change-Id: I44681f3c2fd0435bffa393abbbd1e8eacc5a07da Signed-off-by: Subhash Jadavani [subhashj@codeaurora.org: fixed trivial merge conflicts] Signed-off-by: Subhash Jadavani --- drivers/mmc/core/mmc.c | 22 ---------------------- drivers/mmc/core/sd.c | 1 - 2 files changed, 23 deletions(-) diff --git a/drivers/mmc/core/mmc.c b/drivers/mmc/core/mmc.c index 2261d57af6a5..a0cc1242f299 100644 --- a/drivers/mmc/core/mmc.c +++ b/drivers/mmc/core/mmc.c @@ -2485,27 +2485,6 @@ out: return err; } -/* - * Shutdown callback - */ -static int mmc_shutdown(struct mmc_host *host) -{ - int err = 0; - - /* - * In a specific case for poweroff notify, we need to resume the card - * before we can shutdown it properly. - */ - if (mmc_can_poweroff_notify(host->card) && - !(host->caps2 & MMC_CAP2_FULL_PWR_CYCLE)) - err = _mmc_resume(host); - - if (!err) - err = _mmc_suspend(host, false); - - return err; -} - /* * Callback for resume. */ @@ -2673,7 +2652,6 @@ static const struct mmc_bus_ops mmc_ops = { .runtime_resume = mmc_runtime_resume, .runtime_idle = mmc_runtime_idle, .alive = mmc_alive, - .shutdown = mmc_shutdown, .change_bus_speed = mmc_change_bus_speed, .reset = mmc_reset, }; diff --git a/drivers/mmc/core/sd.c b/drivers/mmc/core/sd.c index efe6878479bd..486910f34e0f 100644 --- a/drivers/mmc/core/sd.c +++ b/drivers/mmc/core/sd.c @@ -1348,7 +1348,6 @@ static const struct mmc_bus_ops mmc_sd_ops = { .suspend = mmc_sd_suspend, .resume = mmc_sd_resume, .alive = mmc_sd_alive, - .shutdown = mmc_sd_suspend, .change_bus_speed = mmc_sd_change_bus_speed, .reset = mmc_sd_reset, };