On Tue, Dec 09, 2008 at 07:26:17AM -0600, Felipe Balbi wrote:
> since you're also cleaning it up, how about:
>
> if (IS_ERR(host->clk)) {
> ret = PTR_ERR(host->clk);
> goto out;
> }
>
> clk_enable(host->clk);
> ...
here's the update patch:
======= cut here ==========
diff --git a/drivers/mmc/host/davinci_mmc.c b/drivers/mmc/host/davinci_mmc.c
index 2e0261e..6a287e6 100644
--- a/drivers/mmc/host/davinci_mmc.c
+++ b/drivers/mmc/host/davinci_mmc.c
@@ -1335,14 +1335,13 @@ static int davinci_mmcsd_probe(struct platform_device
*pdev)
ret = -ENXIO;
host->clk = clk_get(&pdev->dev, "mmc");
- if (!IS_ERR(host->clk)) {
- clk_enable(host->clk);
- host->mmc_input_clk = clk_get_rate(host->clk);
- } else {
+ if (IS_ERR(host->clk)) {
ret = PTR_ERR(host->clk);
goto out;
}
+ clk_enable(host->clk);
+ host->mmc_input_clk = clk_get_rate(host->clk);
init_mmcsd_host(host);
if (mmcsd_cfg.use_4bit_mode)
--
balbi
_______________________________________________
Davinci-linux-open-source mailing list
[email protected]
http://linux.davincidsp.com/mailman/listinfo/davinci-linux-open-source