Commit 0de9dc80 authored by Tian Tao's avatar Tian Tao Committed by Herbert Xu

hwrng: timeriomem - Use device-managed registration API

Use devm_hwrng_register to get rid of manual unregistration.
Signed-off-by: default avatarTian Tao <tiantao6@hisilicon.com>
Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
parent 4cf0806e
...@@ -169,7 +169,7 @@ static int timeriomem_rng_probe(struct platform_device *pdev) ...@@ -169,7 +169,7 @@ static int timeriomem_rng_probe(struct platform_device *pdev)
priv->present = 1; priv->present = 1;
complete(&priv->completion); complete(&priv->completion);
err = hwrng_register(&priv->rng_ops); err = devm_hwrng_register(&pdev->dev, &priv->rng_ops);
if (err) { if (err) {
dev_err(&pdev->dev, "problem registering\n"); dev_err(&pdev->dev, "problem registering\n");
return err; return err;
...@@ -185,7 +185,6 @@ static int timeriomem_rng_remove(struct platform_device *pdev) ...@@ -185,7 +185,6 @@ static int timeriomem_rng_remove(struct platform_device *pdev)
{ {
struct timeriomem_rng_private *priv = platform_get_drvdata(pdev); struct timeriomem_rng_private *priv = platform_get_drvdata(pdev);
hwrng_unregister(&priv->rng_ops);
hrtimer_cancel(&priv->timer); hrtimer_cancel(&priv->timer);
return 0; return 0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment