aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlban Bedel <albeu@free.fr>2015-04-24 10:19:23 -0400
committerMark Brown <broonie@kernel.org>2015-04-27 10:44:57 -0400
commit3e19acdc5bdd9709bfd89cc14cbcd1cb90b44965 (patch)
tree4b623e0ce9a917d9fe31039c86eb2e74f1e1ce26
parent85f62476fc44e6915787f832371400cbdd7d8bff (diff)
spi: spi-ath79: Use clk_prepare_enable and clk_disable_unprepare
Clocks should be prepared and unprepared, fix this by using clk_prepare_enable() and clk_disable_unprepare() instead of clk_enable() and clk_disable(). Signed-off-by: Alban Bedel <albeu@free.fr> Signed-off-by: Mark Brown <broonie@kernel.org>
-rw-r--r--drivers/spi/spi-ath79.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/spi/spi-ath79.c b/drivers/spi/spi-ath79.c
index 239bc31d6791..b37bedd059b3 100644
--- a/drivers/spi/spi-ath79.c
+++ b/drivers/spi/spi-ath79.c
@@ -249,7 +249,7 @@ static int ath79_spi_probe(struct platform_device *pdev)
249 goto err_put_master; 249 goto err_put_master;
250 } 250 }
251 251
252 ret = clk_enable(sp->clk); 252 ret = clk_prepare_enable(sp->clk);
253 if (ret) 253 if (ret)
254 goto err_put_master; 254 goto err_put_master;
255 255
@@ -273,7 +273,7 @@ static int ath79_spi_probe(struct platform_device *pdev)
273err_disable: 273err_disable:
274 ath79_spi_disable(sp); 274 ath79_spi_disable(sp);
275err_clk_disable: 275err_clk_disable:
276 clk_disable(sp->clk); 276 clk_disable_unprepare(sp->clk);
277err_put_master: 277err_put_master:
278 spi_master_put(sp->bitbang.master); 278 spi_master_put(sp->bitbang.master);
279 279
@@ -286,7 +286,7 @@ static int ath79_spi_remove(struct platform_device *pdev)
286 286
287 spi_bitbang_stop(&sp->bitbang); 287 spi_bitbang_stop(&sp->bitbang);
288 ath79_spi_disable(sp); 288 ath79_spi_disable(sp);
289 clk_disable(sp->clk); 289 clk_disable_unprepare(sp->clk);
290 spi_master_put(sp->bitbang.master); 290 spi_master_put(sp->bitbang.master);
291 291
292 return 0; 292 return 0;