Merge tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux
[sfrench/cifs-2.6.git] / drivers / char / hw_random / omap-rng.c
index e9b6ac61fb7f64953e988c130d53f518ca3e7ab0..b27f39688b5e71de16650bb7a67c29a54b7539dd 100644 (file)
@@ -500,7 +500,7 @@ static int omap_rng_probe(struct platform_device *pdev)
        if (ret)
                goto err_register;
 
-       ret = hwrng_register(&priv->rng);
+       ret = devm_hwrng_register(&pdev->dev, &priv->rng);
        if (ret)
                goto err_register;
 
@@ -525,7 +525,6 @@ static int omap_rng_remove(struct platform_device *pdev)
 {
        struct omap_rng_dev *priv = platform_get_drvdata(pdev);
 
-       hwrng_unregister(&priv->rng);
 
        priv->pdata->cleanup(priv);