mmc: host: sdhci-sprd: Fix the missing pm_runtime_put_noidle()
authorBaolin Wang <baolin.wang@linaro.org>
Mon, 15 Jul 2019 10:00:14 +0000 (18:00 +0800)
committerUlf Hansson <ulf.hansson@linaro.org>
Mon, 22 Jul 2019 12:22:44 +0000 (14:22 +0200)
When the SD host controller tries to probe again due to the derferred
probe mechanism, it will always keep the SD host device as runtime
resume state due to missing the runtime put operation in error path
last time.

Thus add the pm_runtime_put_noidle() in error path to make the PM runtime
counter balance, which can make the SD host device's PM runtime work well.

Signed-off-by: Baolin Wang <baolin.wang@linaro.org>
Acked-by: Adrian Hunter <adrian.hunter@intel.com>
Fixes: fb8bd90f83c4 ("mmc: sdhci-sprd: Add Spreadtrum's initial host controller")
Cc: stable@vger.kernel.org
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
drivers/mmc/host/sdhci-sprd.c

index 6ee340a..603a5d9 100644 (file)
@@ -624,6 +624,7 @@ err_cleanup_host:
        sdhci_cleanup_host(host);
 
 pm_runtime_disable:
+       pm_runtime_put_noidle(&pdev->dev);
        pm_runtime_disable(&pdev->dev);
        pm_runtime_set_suspended(&pdev->dev);