From: Dong Aisheng Date: Mon, 4 Nov 2013 08:38:28 +0000 (+0800) Subject: mmc: sdhci-esdhc-imx: fix runtime pm unbalance issue X-Git-Tag: next-20140107~43^2~21 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=de3da654f1806de9842fbe00c094091822655524;p=karo-tx-linux.git mmc: sdhci-esdhc-imx: fix runtime pm unbalance issue Since we're using common esdhc_send_command for tuning commands and the core code will call pm_runtime_put after command is finished. So we add a pm_runtime_get_sync here to get the balance. Signed-off-by: Dong Aisheng Acked-by: Ulf Hansson Signed-off-by: Chris Ball --- diff --git a/drivers/mmc/host/sdhci-esdhc-imx.c b/drivers/mmc/host/sdhci-esdhc-imx.c index b1544a786eb6..0ac4370cd980 100644 --- a/drivers/mmc/host/sdhci-esdhc-imx.c +++ b/drivers/mmc/host/sdhci-esdhc-imx.c @@ -698,6 +698,7 @@ static void esdhc_prepare_tuning(struct sdhci_host *host, u32 val) /* FIXME: delay a bit for card to be ready for next tuning due to errors */ mdelay(1); + pm_runtime_get_sync(host->mmc->parent); reg = readl(host->ioaddr + ESDHC_MIX_CTRL); reg |= ESDHC_MIX_CTRL_EXE_TUNE | ESDHC_MIX_CTRL_SMPCLK_SEL | ESDHC_MIX_CTRL_FBCLK_SEL;