diff options
author | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2015-03-13 00:00:04 +0300 |
---|---|---|
committer | Herbert Xu <herbert@gondor.apana.org.au> | 2015-03-16 13:45:55 +0300 |
commit | 1e6e38a916e2410e80cec5f2e3c075ffd967b027 (patch) | |
tree | c6301174c3a062ec545bc7d8ece6cfc8a9b6a4ab /drivers | |
parent | 6229c16060fee9a015bf476f21e40c6f08609d6e (diff) | |
download | linux-1e6e38a916e2410e80cec5f2e3c075ffd967b027.tar.xz |
hwrng: exynos - make use of devm_hwrng_register
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>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/char/hw_random/exynos-rng.c | 12 |
1 files changed, 1 insertions, 11 deletions
diff --git a/drivers/char/hw_random/exynos-rng.c b/drivers/char/hw_random/exynos-rng.c index fed0830bf724..dc4701fd814f 100644 --- a/drivers/char/hw_random/exynos-rng.c +++ b/drivers/char/hw_random/exynos-rng.c @@ -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 @@ -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); |