aboutsummaryrefslogtreecommitdiff
path: root/drivers/mmc/host/msm_sdcc.c
diff options
context:
space:
mode:
authorStephen Boyd2013-06-17 10:43:11 -0700
committerDavid Brown2013-06-24 13:06:42 -0700
commit7f371b98257c32890fe46a7d277053830b633ad9 (patch)
tree8a447f9dd30ee450b59b4636efdb179bff5e1f6e /drivers/mmc/host/msm_sdcc.c
parentb99a8f621f09de872beacf8cfa424f4317e089bb (diff)
msm_sdcc: Convert to clk_prepare/unprepare
Add calls to clk_prepare and unprepare so that MSM can migrate to the common clock framework. Cc: Chris Ball <cjb@laptop.org> Signed-off-by: Stephen Boyd <sboyd@codeaurora.org> Signed-off-by: David Brown <davidb@codeaurora.org>
Diffstat (limited to 'drivers/mmc/host/msm_sdcc.c')
-rw-r--r--drivers/mmc/host/msm_sdcc.c14
1 files changed, 13 insertions, 1 deletions
diff --git a/drivers/mmc/host/msm_sdcc.c b/drivers/mmc/host/msm_sdcc.c
index 0ee4a57fe6b2..b900de4e7e94 100644
--- a/drivers/mmc/host/msm_sdcc.c
+++ b/drivers/mmc/host/msm_sdcc.c
@@ -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: