summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Lechner <david@lechnology.com>2016-04-05 12:31:50 -0500
committerUlf Hansson <ulf.hansson@linaro.org>2016-05-02 10:33:19 +0200
commite2f3bfbdc9f4929d767bc0d8033322a72d51193e (patch)
tree860eda01486050c708b048887080ac7da6887f0e
parent62ac52b2fbcc8036d1fd4860b232fef2d554fa4d (diff)
mmc: davinci: prepare clock
When trying to use this driver with the common clock framework, enabling the clock fails because it was not prepared. This fixes the problem by calling clk_prepare and clk_enable in a single function. Ditto for clk_disable_unprepare. Signed-off-by: David Lechner <david@lechnology.com> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
-rw-r--r--drivers/mmc/host/davinci_mmc.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/mmc/host/davinci_mmc.c b/drivers/mmc/host/davinci_mmc.c
index 850321421b57..a56373c75983 100644
--- a/drivers/mmc/host/davinci_mmc.c
+++ b/drivers/mmc/host/davinci_mmc.c
@@ -1245,9 +1245,9 @@ static int __init davinci_mmcsd_probe(struct platform_device *pdev)
ret = PTR_ERR(host->clk);
goto clk_get_fail;
}
- ret = clk_enable(host->clk);
+ ret = clk_prepare_enable(host->clk);
if (ret)
- goto clk_enable_fail;
+ goto clk_prepare_enable_fail;
host->mmc_input_clk = clk_get_rate(host->clk);
@@ -1353,8 +1353,8 @@ mmc_add_host_fail:
cpu_freq_fail:
davinci_release_dma_channels(host);
dma_probe_defer:
- clk_disable(host->clk);
-clk_enable_fail:
+ clk_disable_unprepare(host->clk);
+clk_prepare_enable_fail:
clk_get_fail:
ioremap_fail:
mmc_free_host(mmc);
@@ -1369,7 +1369,7 @@ static int __exit davinci_mmcsd_remove(struct platform_device *pdev)
mmc_remove_host(host->mmc);
mmc_davinci_cpufreq_deregister(host);
davinci_release_dma_channels(host);
- clk_disable(host->clk);
+ clk_disable_unprepare(host->clk);
mmc_free_host(host->mmc);
return 0;