mirror of
https://github.com/torvalds/linux.git
synced 2024-11-24 21:21:41 +00:00
hwrng: timeriomem - Use device-managed registration API
Use devm_hwrng_register to get rid of manual unregistration. Signed-off-by: Tian Tao <tiantao6@hisilicon.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
This commit is contained in:
parent
4cf0806ee9
commit
0de9dc8062
@ -169,7 +169,7 @@ static int timeriomem_rng_probe(struct platform_device *pdev)
|
||||
priv->present = 1;
|
||||
complete(&priv->completion);
|
||||
|
||||
err = hwrng_register(&priv->rng_ops);
|
||||
err = devm_hwrng_register(&pdev->dev, &priv->rng_ops);
|
||||
if (err) {
|
||||
dev_err(&pdev->dev, "problem registering\n");
|
||||
return err;
|
||||
@ -185,7 +185,6 @@ static int timeriomem_rng_remove(struct platform_device *pdev)
|
||||
{
|
||||
struct timeriomem_rng_private *priv = platform_get_drvdata(pdev);
|
||||
|
||||
hwrng_unregister(&priv->rng_ops);
|
||||
hrtimer_cancel(&priv->timer);
|
||||
|
||||
return 0;
|
||||
|
Loading…
Reference in New Issue
Block a user