aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/spi
diff options
context:
space:
mode:
authorJingoo Han <jg1.han@samsung.com>2013-12-09 05:21:22 -0500
committerMark Brown <broonie@linaro.org>2013-12-09 12:31:38 -0500
commitbb489841b1312f60b2450b01b1c5fa019872f0d3 (patch)
tree97159d2bdf2b16857c235f6d5139930775aafdd3 /drivers/spi
parent6ce4eac1f600b34f2f7f58f9cd8f0503d79e42ae (diff)
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')
-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 744841e095e4..7f2121fe2622 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)
434 spi = spi_master_get_devdata(master); 434 spi = spi_master_get_devdata(master);
435 spi->master = master; 435 spi->master = master;
436 436
437 spi->clk = clk_get(&pdev->dev, NULL); 437 spi->clk = devm_clk_get(&pdev->dev, NULL);
438 if (IS_ERR(spi->clk)) { 438 if (IS_ERR(spi->clk)) {
439 status = PTR_ERR(spi->clk); 439 status = PTR_ERR(spi->clk);
440 goto out; 440 goto out;
@@ -465,7 +465,6 @@ static int orion_spi_probe(struct platform_device *pdev)
465 465
466out_rel_clk: 466out_rel_clk:
467 clk_disable_unprepare(spi->clk); 467 clk_disable_unprepare(spi->clk);
468 clk_put(spi->clk);
469out: 468out:
470 spi_master_put(master); 469 spi_master_put(master);
471 return status; 470 return status;
@@ -481,7 +480,6 @@ static int orion_spi_remove(struct platform_device *pdev)
481 spi = spi_master_get_devdata(master); 480 spi = spi_master_get_devdata(master);
482 481
483 clk_disable_unprepare(spi->clk); 482 clk_disable_unprepare(spi->clk);
484 clk_put(spi->clk);
485 483
486 return 0; 484 return 0;
487} 485}