OSDN Git Service

mmc: sdhci-esdhc-imx: Fixup ->remove()
[uclinux-h8/linux.git] / drivers / mmc / host / sdhci-esdhc-imx.c
index af1f7c0..043866c 100644 (file)
@@ -1103,16 +1103,15 @@ static int sdhci_esdhc_imx_remove(struct platform_device *pdev)
        struct pltfm_imx_data *imx_data = pltfm_host->priv;
        int dead = (readl(host->ioaddr + SDHCI_INT_STATUS) == 0xffffffff);
 
-       sdhci_remove_host(host, dead);
-
-       pm_runtime_dont_use_autosuspend(&pdev->dev);
+       pm_runtime_get_sync(&pdev->dev);
        pm_runtime_disable(&pdev->dev);
+       pm_runtime_put_noidle(&pdev->dev);
 
-       if (!IS_ENABLED(CONFIG_PM)) {
-               clk_disable_unprepare(imx_data->clk_per);
-               clk_disable_unprepare(imx_data->clk_ipg);
-               clk_disable_unprepare(imx_data->clk_ahb);
-       }
+       sdhci_remove_host(host, dead);
+
+       clk_disable_unprepare(imx_data->clk_per);
+       clk_disable_unprepare(imx_data->clk_ipg);
+       clk_disable_unprepare(imx_data->clk_ahb);
 
        sdhci_pltfm_free(pdev);