summaryrefslogtreecommitdiffstats
path: root/drivers/char
diff options
context:
space:
mode:
authorThomas Petazzoni <thomas.petazzoni@free-electrons.com>2017-03-07 15:14:47 +0100
committerHerbert Xu <herbert@gondor.apana.org.au>2017-03-08 07:01:12 +0100
commit761c2510283066324cab7859930777ee34cbca78 (patch)
treea3008957bab912e6d500f0661f0bbb5197011429 /drivers/char
parenthwrng: omap - write registers after enabling the clock (diff)
downloadlinux-761c2510283066324cab7859930777ee34cbca78.tar.xz
linux-761c2510283066324cab7859930777ee34cbca78.zip
hwrng: omap - use devm_clk_get() instead of of_clk_get()
The omap-rng driver currently uses of_clk_get() to get a reference to the clock, but never releases that reference. This commit fixes that by using devm_clk_get() instead. Fixes: 383212425c926 ("hwrng: omap - Add device variant for SafeXcel IP-76 found in Armada 8K") Cc: <stable@vger.kernel.org> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'drivers/char')
-rw-r--r--drivers/char/hw_random/omap-rng.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/char/hw_random/omap-rng.c b/drivers/char/hw_random/omap-rng.c
index efa3747c1750..d2866280f130 100644
--- a/drivers/char/hw_random/omap-rng.c
+++ b/drivers/char/hw_random/omap-rng.c
@@ -398,7 +398,7 @@ static int of_get_omap_rng_device_details(struct omap_rng_dev *priv,
return err;
}
- priv->clk = of_clk_get(pdev->dev.of_node, 0);
+ priv->clk = devm_clk_get(&pdev->dev, NULL);
if (IS_ERR(priv->clk) && PTR_ERR(priv->clk) == -EPROBE_DEFER)
return -EPROBE_DEFER;
if (!IS_ERR(priv->clk)) {