summaryrefslogtreecommitdiffstats
path: root/drivers/char/hw_random/omap3-rom-rng.c
diff options
context:
space:
mode:
authorJingoo Han <jg1.han@samsung.com>2014-02-27 14:02:24 +0900
committerHerbert Xu <herbert@gondor.apana.org.au>2014-03-10 20:13:36 +0800
commit0574bce9691f238f3351b28c27de337d4519d595 (patch)
tree07d7dce4afe2c781dde749cf469d6d7d9e4778a3 /drivers/char/hw_random/omap3-rom-rng.c
parent0c0becd0269240cd832b7aac16fb9b48d067520e (diff)
downloadlinux-0574bce9691f238f3351b28c27de337d4519d595.tar.bz2
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/char/hw_random/omap3-rom-rng.c')
-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)
}
setup_timer(&idle_timer, omap3_rom_rng_idle, 0);
- rng_clk = clk_get(&pdev->dev, "ick");
+ rng_clk = devm_clk_get(&pdev->dev, "ick");
if (IS_ERR(rng_clk)) {
pr_err("unable to get RNG clock\n");
return PTR_ERR(rng_clk);
@@ -120,7 +120,6 @@ static int omap3_rom_rng_remove(struct platform_device *pdev)
{
hwrng_unregister(&omap3_rom_rng_ops);
clk_disable_unprepare(rng_clk);
- clk_put(rng_clk);
return 0;
}