aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mmc/host/sdhci-spear.c
diff options
context:
space:
mode:
authorViresh Kumar <viresh.kumar@linaro.org>2012-09-28 06:28:23 -0400
committerChris Ball <cjb@laptop.org>2012-10-07 17:41:45 -0400
commitda764f97df0e5e05e5453279f934531c0cf52e11 (patch)
treeb404910f0587cbaf3a61ec8dcc2c4f960ed59f56 /drivers/mmc/host/sdhci-spear.c
parent067bf748bde70154a1fe1734b01f82b827c65b23 (diff)
mmc: sdhci-spear: Add clk_{un}prepare() support
clk_{un}prepare is mandatory for platforms using common clock framework. Since this driver is used by SPEAr platform, which supports common clock framework, add clk_{un}prepare() support for it. Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org> Signed-off-by: Chris Ball <cjb@laptop.org>
Diffstat (limited to 'drivers/mmc/host/sdhci-spear.c')
-rw-r--r--drivers/mmc/host/sdhci-spear.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/mmc/host/sdhci-spear.c b/drivers/mmc/host/sdhci-spear.c
index ecad282741d6..6be89c032deb 100644
--- a/drivers/mmc/host/sdhci-spear.c
+++ b/drivers/mmc/host/sdhci-spear.c
@@ -140,7 +140,7 @@ static int __devinit sdhci_probe(struct platform_device *pdev)
140 goto err; 140 goto err;
141 } 141 }
142 142
143 ret = clk_enable(sdhci->clk); 143 ret = clk_prepare_enable(sdhci->clk);
144 if (ret) { 144 if (ret) {
145 dev_dbg(&pdev->dev, "Error enabling clock\n"); 145 dev_dbg(&pdev->dev, "Error enabling clock\n");
146 goto put_clk; 146 goto put_clk;
@@ -260,7 +260,7 @@ set_drvdata:
260free_host: 260free_host:
261 sdhci_free_host(host); 261 sdhci_free_host(host);
262disable_clk: 262disable_clk:
263 clk_disable(sdhci->clk); 263 clk_disable_unprepare(sdhci->clk);
264put_clk: 264put_clk:
265 clk_put(sdhci->clk); 265 clk_put(sdhci->clk);
266err: 266err:
@@ -282,7 +282,7 @@ static int __devexit sdhci_remove(struct platform_device *pdev)
282 282
283 sdhci_remove_host(host, dead); 283 sdhci_remove_host(host, dead);
284 sdhci_free_host(host); 284 sdhci_free_host(host);
285 clk_disable(sdhci->clk); 285 clk_disable_unprepare(sdhci->clk);
286 clk_put(sdhci->clk); 286 clk_put(sdhci->clk);
287 287
288 return 0; 288 return 0;
@@ -297,7 +297,7 @@ static int sdhci_suspend(struct device *dev)
297 297
298 ret = sdhci_suspend_host(host); 298 ret = sdhci_suspend_host(host);
299 if (!ret) 299 if (!ret)
300 clk_disable(sdhci->clk); 300 clk_disable_unprepare(sdhci->clk);
301 301
302 return ret; 302 return ret;
303} 303}
@@ -308,7 +308,7 @@ static int sdhci_resume(struct device *dev)
308 struct spear_sdhci *sdhci = dev_get_platdata(dev); 308 struct spear_sdhci *sdhci = dev_get_platdata(dev);
309 int ret; 309 int ret;
310 310
311 ret = clk_enable(sdhci->clk); 311 ret = clk_prepare_enable(sdhci->clk);
312 if (ret) { 312 if (ret) {
313 dev_dbg(dev, "Resume: Error enabling clock\n"); 313 dev_dbg(dev, "Resume: Error enabling clock\n");
314 return ret; 314 return ret;