@@ -416,8 +416,7 @@ static int __init orion_spi_probe(struct platform_device *pdev)
goto out;
}
- clk_prepare(spi->clk);
- clk_enable(spi->clk);
+ clk_prepare_enable(spi->clk);
tclk_hz = clk_get_rate(spi->clk);
spi->max_speed = DIV_ROUND_UP(tclk_hz, 4);
spi->min_speed = DIV_ROUND_UP(tclk_hz, 30);
@@ -2142,16 +2142,10 @@ pl022_probe(struct amba_device *adev, const struct amba_id *id)
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;
- }
-
- status = clk_enable(pl022->clk);
+ status = clk_prepare_enable(pl022->clk);
if (status) {
dev_err(&adev->dev, "could not enable SSP/SPI bus clock\n");
- goto err_no_clk_en;
+ goto err_clk_prep;
}
/* Initialize transfer pump */
@@ -2207,9 +2201,7 @@ pl022_probe(struct amba_device *adev, const struct amba_id *id)
free_irq(adev->irq[0], pl022);
err_no_irq:
- clk_disable(pl022->clk);
- err_no_clk_en:
- clk_unprepare(pl022->clk);
+ clk_disable_unprepare(pl022->clk);
err_clk_prep:
clk_put(pl022->clk);
err_no_clk:
@@ -2243,8 +2235,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_disable_unprepare(pl022->clk);
clk_put(pl022->clk);
pm_runtime_disable(&adev->dev);
iounmap(pl022->virtbase);