Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

David Lechner and committed by
Ulf Hansson
e2f3bfbd 62ac52b2

+5 -5
+5 -5
drivers/mmc/host/davinci_mmc.c
··· 1245 1245 ret = PTR_ERR(host->clk); 1246 1246 goto clk_get_fail; 1247 1247 } 1248 - ret = clk_enable(host->clk); 1248 + ret = clk_prepare_enable(host->clk); 1249 1249 if (ret) 1250 - goto clk_enable_fail; 1250 + goto clk_prepare_enable_fail; 1251 1251 1252 1252 host->mmc_input_clk = clk_get_rate(host->clk); 1253 1253 ··· 1353 1353 cpu_freq_fail: 1354 1354 davinci_release_dma_channels(host); 1355 1355 dma_probe_defer: 1356 - clk_disable(host->clk); 1357 - clk_enable_fail: 1356 + clk_disable_unprepare(host->clk); 1357 + clk_prepare_enable_fail: 1358 1358 clk_get_fail: 1359 1359 ioremap_fail: 1360 1360 mmc_free_host(mmc); ··· 1369 1369 mmc_remove_host(host->mmc); 1370 1370 mmc_davinci_cpufreq_deregister(host); 1371 1371 davinci_release_dma_channels(host); 1372 - clk_disable(host->clk); 1372 + clk_disable_unprepare(host->clk); 1373 1373 mmc_free_host(host->mmc); 1374 1374 1375 1375 return 0;