summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornotro <notro@tronnes.org>2014-07-06 12:07:25 +0200
committerpopcornmix <popcornmix@gmail.com>2015-05-18 14:10:37 +0100
commite89c65d05f59539d36b1141c9949099d221da2ce (patch)
treeceeafe98235d4c02b7a84052311a9dc8f2bc38dc
parent058850accbcb90ce90d8eabaa055099b5fa9d1b2 (diff)
downloadlinux-e89c65d05f59539d36b1141c9949099d221da2ce.tar.gz
spi-bcm2708: Prepare for Common Clock Framework migration
As part of migrating to use the Common Clock Framework, replace clk_enable() with clk_prepare_enable() and clk_disable() with clk_disable_unprepare(). This does not affect behaviour under the current clock implementation. Also add a missing clk_disable_unprepare() in the probe error path. Signed-off-by: Noralf Tronnes <notro@tronnes.org>
-rw-r--r--drivers/spi/spi-bcm2708.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/spi/spi-bcm2708.c b/drivers/spi/spi-bcm2708.c
index b04a57db0466..349d21fe3fe3 100644
--- a/drivers/spi/spi-bcm2708.c
+++ b/drivers/spi/spi-bcm2708.c
@@ -545,7 +545,7 @@ static int bcm2708_spi_probe(struct platform_device *pdev)
}
/* initialise the hardware */
- clk_enable(clk);
+ clk_prepare_enable(clk);
bcm2708_wr(bs, SPI_CS, SPI_CS_REN | SPI_CS_CLEAR_RX | SPI_CS_CLEAR_TX);
err = spi_register_master(master);
@@ -561,6 +561,7 @@ static int bcm2708_spi_probe(struct platform_device *pdev)
out_free_irq:
free_irq(bs->irq, master);
+ clk_disable_unprepare(bs->clk);
out_workqueue:
destroy_workqueue(bs->workq);
out_iounmap:
@@ -585,7 +586,7 @@ static int bcm2708_spi_remove(struct platform_device *pdev)
flush_work(&bs->work);
- clk_disable(bs->clk);
+ clk_disable_unprepare(bs->clk);
clk_put(bs->clk);
free_irq(bs->irq, master);
iounmap(bs->base);