mmc: core: fix disable clock scaling

Need to cancel clock scaling work only when scaling was enabled and
the card is in the legacy (non-cq mode).

Change-Id: Ibfe00e54c495e249d0937345ffc6e6335940d21e
Signed-off-by: Konstantin Dorfman <kdorfman@codeaurora.org>
This commit is contained in:
Konstantin Dorfman 2015-06-03 12:04:35 +03:00
parent 5aee76ab1e
commit d86bd26152
1 changed files with 4 additions and 1 deletions

View File

@ -3578,7 +3578,10 @@ EXPORT_SYMBOL(mmc_clk_scaling);
*/
void mmc_disable_clk_scaling(struct mmc_host *host)
{
cancel_delayed_work_sync(&host->clk_scaling.work);
if (host->clk_scaling.enable &&
host->card && !mmc_card_cmdq(host->card))
cancel_delayed_work_sync(&host->clk_scaling.work);
if (host->ops->notify_load)
host->ops->notify_load(host, MMC_LOAD_LOW);
host->clk_scaling.enable = false;