summaryrefslogtreecommitdiffstats
path: root/drivers/mmc/host/tmio_mmc_core.c
diff options
context:
space:
mode:
authorUlf Hansson <ulf.hansson@linaro.org>2019-09-13 10:03:15 +0200
committerUlf Hansson <ulf.hansson@linaro.org>2019-09-13 13:48:35 +0200
commit8861474a105c91e812d38cd65d3be795c7f32c4f (patch)
treebc2999c029207a93fb1f32ac2153316ea46f97c5 /drivers/mmc/host/tmio_mmc_core.c
parent49baa01c8b99ef92958e18fb58ebeb5dfdcde8af (diff)
downloadlinux-8861474a105c91e812d38cd65d3be795c7f32c4f.tar.bz2
Revert "mmc: tmio: move runtime PM enablement to the driver implementations"
This reverts commit 7ff213193310ef8d0ee5f04f79d791210787ac2c. It turns out that the above commit introduces other problems. For example, calling pm_runtime_set_active() must not be done prior calling pm_runtime_enable() as that makes it fail. This leads to additional problems, such as clock enables being wrongly balanced. Rather than fixing the problem on top, let's start over by doing a revert. Fixes: 7ff213193310 ("mmc: tmio: move runtime PM enablement to the driver implementations") Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org> Tested-by: Geert Uytterhoeven <geert@linux-m68k.org>
Diffstat (limited to 'drivers/mmc/host/tmio_mmc_core.c')
-rw-r--r--drivers/mmc/host/tmio_mmc_core.c11
1 files changed, 2 insertions, 9 deletions
diff --git a/drivers/mmc/host/tmio_mmc_core.c b/drivers/mmc/host/tmio_mmc_core.c
index 2cb3f951c3e2..8b299c1f0069 100644
--- a/drivers/mmc/host/tmio_mmc_core.c
+++ b/drivers/mmc/host/tmio_mmc_core.c
@@ -1153,15 +1153,6 @@ void tmio_mmc_host_free(struct tmio_mmc_host *host)
}
EXPORT_SYMBOL_GPL(tmio_mmc_host_free);
-/**
- * tmio_mmc_host_probe() - Common probe for all implementations
- * @_host: Host to probe
- *
- * Perform tasks common to all implementations probe functions.
- *
- * The caller should have called pm_runtime_enable() prior to calling
- * the common probe function.
- */
int tmio_mmc_host_probe(struct tmio_mmc_host *_host)
{
struct platform_device *pdev = _host->pdev;
@@ -1260,6 +1251,7 @@ int tmio_mmc_host_probe(struct tmio_mmc_host *_host)
pm_runtime_set_active(&pdev->dev);
pm_runtime_set_autosuspend_delay(&pdev->dev, 50);
pm_runtime_use_autosuspend(&pdev->dev);
+ pm_runtime_enable(&pdev->dev);
ret = mmc_add_host(mmc);
if (ret)
@@ -1295,6 +1287,7 @@ void tmio_mmc_host_remove(struct tmio_mmc_host *host)
pm_runtime_dont_use_autosuspend(&pdev->dev);
pm_runtime_put_sync(&pdev->dev);
+ pm_runtime_disable(&pdev->dev);
}
EXPORT_SYMBOL_GPL(tmio_mmc_host_remove);