aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorJingoo Han <jg1.han@samsung.com>2014-02-27 00:02:24 -0500
committerHerbert Xu <herbert@gondor.apana.org.au>2014-03-10 08:13:36 -0400
commit0574bce9691f238f3351b28c27de337d4519d595 (patch)
tree07d7dce4afe2c781dde749cf469d6d7d9e4778a3 /drivers
parent0c0becd0269240cd832b7aac16fb9b48d067520e (diff)
hwrng: omap3-rom - Use devm_clk_get()
Use devm_clk_get() to make cleanup paths simpler. Signed-off-by: Jingoo Han <jg1.han@samsung.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/char/hw_random/omap3-rom-rng.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/char/hw_random/omap3-rom-rng.c b/drivers/char/hw_random/omap3-rom-rng.c
index c853e9e68573..6f2eaffed623 100644
--- a/drivers/char/hw_random/omap3-rom-rng.c
+++ b/drivers/char/hw_random/omap3-rom-rng.c
@@ -103,7 +103,7 @@ static int omap3_rom_rng_probe(struct platform_device *pdev)
103 } 103 }
104 104
105 setup_timer(&idle_timer, omap3_rom_rng_idle, 0); 105 setup_timer(&idle_timer, omap3_rom_rng_idle, 0);
106 rng_clk = clk_get(&pdev->dev, "ick"); 106 rng_clk = devm_clk_get(&pdev->dev, "ick");
107 if (IS_ERR(rng_clk)) { 107 if (IS_ERR(rng_clk)) {
108 pr_err("unable to get RNG clock\n"); 108 pr_err("unable to get RNG clock\n");
109 return PTR_ERR(rng_clk); 109 return PTR_ERR(rng_clk);
@@ -120,7 +120,6 @@ static int omap3_rom_rng_remove(struct platform_device *pdev)
120{ 120{
121 hwrng_unregister(&omap3_rom_rng_ops); 121 hwrng_unregister(&omap3_rom_rng_ops);
122 clk_disable_unprepare(rng_clk); 122 clk_disable_unprepare(rng_clk);
123 clk_put(rng_clk);
124 return 0; 123 return 0;
125} 124}
126 125