]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
msm_sdcc: Convert to clk_prepare/unprepare
authorStephen Boyd <sboyd@codeaurora.org>
Tue, 4 Jun 2013 19:25:30 +0000 (12:25 -0700)
committerDavid Brown <davidb@codeaurora.org>
Wed, 12 Jun 2013 21:43:29 +0000 (14:43 -0700)
Add calls to clk_prepare and unprepare so that MSM can migrate to
the common clock framework.

Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
Signed-off-by: David Brown <davidb@codeaurora.org>
drivers/mmc/host/msm_sdcc.c

index 0ee4a57fe6b28d03e7cdb6e87cbac897f429d0a5..b900de4e7e942c38c6bd5c78c521325619b83aca 100644 (file)
@@ -1268,10 +1268,18 @@ msmsdcc_probe(struct platform_device *pdev)
                goto clk_put;
        }
 
+       ret = clk_prepare(host->pclk);
+       if (ret)
+               goto clk_put;
+
+       ret = clk_prepare(host->clk);
+       if (ret)
+               goto clk_unprepare_p;
+
        /* Enable clocks */
        ret = msmsdcc_enable_clocks(host);
        if (ret)
-               goto clk_put;
+               goto clk_unprepare;
 
        host->pclk_rate = clk_get_rate(host->pclk);
        host->clk_rate = clk_get_rate(host->clk);
@@ -1386,6 +1394,10 @@ msmsdcc_probe(struct platform_device *pdev)
                free_irq(host->stat_irq, host);
  clk_disable:
        msmsdcc_disable_clocks(host, 0);
+ clk_unprepare:
+       clk_unprepare(host->clk);
+ clk_unprepare_p:
+       clk_unprepare(host->pclk);
  clk_put:
        clk_put(host->clk);
  pclk_put: