Skip to content

Commit

Permalink
hwrng: exynos - make use of devm_hwrng_register
Browse files Browse the repository at this point in the history
This allows us to get rid of remove() method.

Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
  • Loading branch information
Dmitry Torokhov authored and Herbert Xu committed Mar 16, 2015
1 parent 6229c16 commit 1e6e38a
Showing 1 changed file with 1 addition and 11 deletions.
12 changes: 1 addition & 11 deletions drivers/char/hw_random/exynos-rng.c
Original file line number Diff line number Diff line change
Expand Up @@ -131,16 +131,7 @@ static int exynos_rng_probe(struct platform_device *pdev)
pm_runtime_use_autosuspend(&pdev->dev);
pm_runtime_enable(&pdev->dev);

return hwrng_register(&exynos_rng->rng);
}

static int exynos_rng_remove(struct platform_device *pdev)
{
struct exynos_rng *exynos_rng = platform_get_drvdata(pdev);

hwrng_unregister(&exynos_rng->rng);

return 0;
return devm_hwrng_register(&pdev->dev, &exynos_rng->rng);
}

#ifdef CONFIG_PM
Expand Down Expand Up @@ -172,7 +163,6 @@ static struct platform_driver exynos_rng_driver = {
.pm = &exynos_rng_pm_ops,
},
.probe = exynos_rng_probe,
.remove = exynos_rng_remove,
};

module_platform_driver(exynos_rng_driver);
Expand Down

0 comments on commit 1e6e38a

Please sign in to comment.