2015-02-11 10:17:55 +00:00
|
|
|
From d828fe6d765939e457e87d7f348adfe69cfd4175 Mon Sep 17 00:00:00 2001
|
|
|
|
From: notro <notro@tronnes.org>
|
|
|
|
Date: Sun, 6 Jul 2014 12:07:25 +0200
|
|
|
|
Subject: [PATCH 047/114] 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>
|
|
|
|
---
|
|
|
|
drivers/spi/spi-bcm2708.c | 5 +++--
|
|
|
|
1 file changed, 3 insertions(+), 2 deletions(-)
|
|
|
|
|
|
|
|
--- a/drivers/spi/spi-bcm2708.c
|
|
|
|
+++ b/drivers/spi/spi-bcm2708.c
|
2015-02-13 07:38:27 +00:00
|
|
|
@@ -545,7 +545,7 @@ static int bcm2708_spi_probe(struct plat
|
2015-02-11 10:17:55 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/* 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);
|
2015-02-13 07:38:27 +00:00
|
|
|
@@ -561,6 +561,7 @@ static int bcm2708_spi_probe(struct plat
|
2015-02-11 10:17:55 +00:00
|
|
|
|
|
|
|
out_free_irq:
|
|
|
|
free_irq(bs->irq, master);
|
|
|
|
+ clk_disable_unprepare(bs->clk);
|
|
|
|
out_workqueue:
|
|
|
|
destroy_workqueue(bs->workq);
|
|
|
|
out_iounmap:
|
2015-02-13 07:38:27 +00:00
|
|
|
@@ -585,7 +586,7 @@ static int bcm2708_spi_remove(struct pla
|
2015-02-11 10:17:55 +00:00
|
|
|
|
|
|
|
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);
|