diff options
author | Florian Fainelli <f.fainelli@gmail.com> | 2017-11-07 16:44:42 -0800 |
---|---|---|
committer | Herbert Xu <herbert@gondor.apana.org.au> | 2017-11-29 16:43:44 +1100 |
commit | 16a4c04b3729910f864512a1150fee5ad19efb4a (patch) | |
tree | 7f88c3f37d400266d2a89b444cad3477ad8ec29a /drivers | |
parent | ec94bca7be6b29c1aebf2e1e95855ee6ca0d5d62 (diff) | |
download | linux-16a4c04b3729910f864512a1150fee5ad19efb4a.tar.gz linux-16a4c04b3729910f864512a1150fee5ad19efb4a.tar.bz2 linux-16a4c04b3729910f864512a1150fee5ad19efb4a.zip |
hwrng: bcm2835 - Use device managed helpers
Now that we have moved the RNG disabling into a hwrng::cleanup callback,
we can use the device managed registration operation and remove our
remove callback since it won't do anything necessary.
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/char/hw_random/bcm2835-rng.c | 13 |
1 files changed, 1 insertions, 12 deletions
diff --git a/drivers/char/hw_random/bcm2835-rng.c b/drivers/char/hw_random/bcm2835-rng.c index 4d0356110b1b..67b9bd3be28d 100644 --- a/drivers/char/hw_random/bcm2835-rng.c +++ b/drivers/char/hw_random/bcm2835-rng.c @@ -138,7 +138,7 @@ static int bcm2835_rng_probe(struct platform_device *pdev) rng_setup(priv->base); /* register driver */ - err = hwrng_register(&priv->rng); + err = devm_hwrng_register(dev, &priv->rng); if (err) dev_err(dev, "hwrng registration failed\n"); else @@ -147,16 +147,6 @@ static int bcm2835_rng_probe(struct platform_device *pdev) return err; } -static int bcm2835_rng_remove(struct platform_device *pdev) -{ - struct bcm2835_rng_priv *priv = platform_get_drvdata(pdev); - - /* unregister driver */ - hwrng_unregister(&priv->rng); - - return 0; -} - MODULE_DEVICE_TABLE(of, bcm2835_rng_of_match); static struct platform_driver bcm2835_rng_driver = { @@ -165,7 +155,6 @@ static struct platform_driver bcm2835_rng_driver = { .of_match_table = bcm2835_rng_of_match, }, .probe = bcm2835_rng_probe, - .remove = bcm2835_rng_remove, }; module_platform_driver(bcm2835_rng_driver); |