mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-09-18 22:14:16 +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
1 changed files with 1 additions and 2 deletions
|
@ -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…
Add table
Reference in a new issue