diff options
author | Russell King <rmk+kernel@arm.linux.org.uk> | 2011-09-22 14:27:11 +0100 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2011-09-27 09:25:53 +0100 |
commit | 7ff6bcf048e6a9849ea0b44269fa4c1c72869db2 (patch) | |
tree | 91f18c24ddd46ad6a01ffbe039d51cf3be067b91 /drivers/spi | |
parent | 6f5ad96301d4b897f09a893d331a0b18b3fff6b1 (diff) |
clk: spi-pl022: convert to clk_prepare()/clk_unprepare()
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'drivers/spi')
-rw-r--r-- | drivers/spi/spi-pl022.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/drivers/spi/spi-pl022.c b/drivers/spi/spi-pl022.c index 3520cf955b95..1ab2fa0d37fd 100644 --- a/drivers/spi/spi-pl022.c +++ b/drivers/spi/spi-pl022.c @@ -2187,6 +2187,13 @@ pl022_probe(struct amba_device *adev, const struct amba_id *id) dev_err(&adev->dev, "could not retrieve SSP/SPI bus clock\n"); goto err_no_clk; } + + status = clk_prepare(pl022->clk); + if (status) { + dev_err(&adev->dev, "could not prepare SSP/SPI bus clock\n"); + goto err_clk_prep; + } + /* Disable SSP */ writew((readw(SSP_CR1(pl022->virtbase)) & (~SSP_CR1_MASK_SSE)), SSP_CR1(pl022->virtbase)); @@ -2238,6 +2245,8 @@ pl022_probe(struct amba_device *adev, const struct amba_id *id) pl022_dma_remove(pl022); free_irq(adev->irq[0], pl022); err_no_irq: + clk_unprepare(pl022->clk); + err_clk_prep: clk_put(pl022->clk); err_no_clk: iounmap(pl022->virtbase); @@ -2271,6 +2280,7 @@ pl022_remove(struct amba_device *adev) pl022_dma_remove(pl022); free_irq(adev->irq[0], pl022); clk_disable(pl022->clk); + clk_unprepare(pl022->clk); clk_put(pl022->clk); iounmap(pl022->virtbase); amba_release_regions(adev); |