mmc: core: fix disable clock scaling

Disable clock scaling only when clock scaling was properly initialized.

Change-Id: I7ec45e49c5ce18ea6aef0e272e79325fa8952c5b
Signed-off-by: Konstantin Dorfman <kdorfman@codeaurora.org>
This commit is contained in:
Konstantin Dorfman 2015-02-12 11:23:32 +02:00 committed by Subhash Jadavani
parent a5d50c0f53
commit fbd98e0c5c

View file

@ -3015,8 +3015,10 @@ out:
*/
void mmc_disable_clk_scaling(struct mmc_host *host)
{
cancel_delayed_work_sync(&host->clk_scaling.work);
host->clk_scaling.enable = false;
if (host->clk_scaling.initialized) {
cancel_delayed_work_sync(&host->clk_scaling.work);
host->clk_scaling.enable = false;
}
}
EXPORT_SYMBOL_GPL(mmc_disable_clk_scaling);