On Tue, Dec 24, 2013 at 11:16:09AM +0800, Shawn Guo wrote: > On Tue, Dec 24, 2013 at 10:34:13AM +0800, Dong Aisheng wrote: > > > > @@ -1169,10 +1167,6 @@ static int sdhci_esdhc_imx_remove(struct platform_device *pdev) > > > > pm_runtime_dont_use_autosuspend(&pdev->dev); > > > > pm_runtime_disable(&pdev->dev); > > > > > > > > - clk_disable_unprepare(imx_data->clk_per); > > > > - clk_disable_unprepare(imx_data->clk_ipg); > > > > - clk_disable_unprepare(imx_data->clk_ahb); > > > > > > It's obviously a bad change to me. We should definitely have these > > > clk_disable_unprepare() calls in sdhci_esdhc_imx_remove() to match the > > > clk_prepare_enable() calls in sdhci_esdhc_imx_probe(). Otherwise, at > > > least for !CONFIG_PM_RUNTIME build, it's broken. > > > > > > > How about add the !CONFIG_RUMTIME_PM precondition for these code to avoid > > break non runtime pm case? > > > > #ifndef CONFIG_PM_RUNTIME > > clk_disable_unprepare(imx_data->clk_per); > > clk_disable_unprepare(imx_data->clk_ipg); > > clk_disable_unprepare(imx_data->clk_ahb); > > #endif > > It's quite ugly. But well, if we do not have anything better, we have > to live with it. To make it look less ugly, we may want to use something like the following. if (!IS_ENABLED(CONFIG_PM_RUNTIME) Shawn -- To unsubscribe from this list: send the line "unsubscribe linux-mmc" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html