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.

Shawn

--
To unsubscribe from this list: send the line "unsubscribe linux-mmc" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to