summaryrefslogtreecommitdiffstats
path: root/drivers/spi/spi-orion.c
diff options
context:
space:
mode:
authorJingoo Han <jg1.han@samsung.com>2013-12-09 19:21:22 +0900
committerMark Brown <broonie@linaro.org>2013-12-09 17:31:38 +0000
commitbb489841b1312f60b2450b01b1c5fa019872f0d3 (patch)
tree97159d2bdf2b16857c235f6d5139930775aafdd3 /drivers/spi/spi-orion.c
parent6ce4eac1f600b34f2f7f58f9cd8f0503d79e42ae (diff)
downloadop-kernel-dev-bb489841b1312f60b2450b01b1c5fa019872f0d3.zip
op-kernel-dev-bb489841b1312f60b2450b01b1c5fa019872f0d3.tar.gz
spi: orion: Use devm_clk_get()
Use devm_clk_get() to make cleanup paths simpler. Signed-off-by: Jingoo Han <jg1.han@samsung.com> Acked-by: Jason Cooper <jason@lakedaemon.net> Signed-off-by: Mark Brown <broonie@linaro.org>
Diffstat (limited to 'drivers/spi/spi-orion.c')
-rw-r--r--drivers/spi/spi-orion.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/spi/spi-orion.c b/drivers/spi/spi-orion.c
index 744841e..7f2121f 100644
--- a/drivers/spi/spi-orion.c
+++ b/drivers/spi/spi-orion.c
@@ -434,7 +434,7 @@ static int orion_spi_probe(struct platform_device *pdev)
spi = spi_master_get_devdata(master);
spi->master = master;
- spi->clk = clk_get(&pdev->dev, NULL);
+ spi->clk = devm_clk_get(&pdev->dev, NULL);
if (IS_ERR(spi->clk)) {
status = PTR_ERR(spi->clk);
goto out;
@@ -465,7 +465,6 @@ static int orion_spi_probe(struct platform_device *pdev)
out_rel_clk:
clk_disable_unprepare(spi->clk);
- clk_put(spi->clk);
out:
spi_master_put(master);
return status;
@@ -481,7 +480,6 @@ static int orion_spi_remove(struct platform_device *pdev)
spi = spi_master_get_devdata(master);
clk_disable_unprepare(spi->clk);
- clk_put(spi->clk);
return 0;
}
OpenPOWER on IntegriCloud