diff options
author | Vaishali Thakkar <vthakkar1994@gmail.com> | 2015-09-10 11:32:26 +0530 |
---|---|---|
committer | Herbert Xu <herbert@gondor.apana.org.au> | 2015-09-21 22:00:38 +0800 |
commit | 04b7d704c6160fa4e8eeffc8540575fb15142f7f (patch) | |
tree | 1e7f7446d8738b8df77ab231dba1f6c58dbcd122 | |
parent | a2712e6c75f1e95b7c31830c19191e8fa367c15a (diff) | |
download | talos-obmc-linux-04b7d704c6160fa4e8eeffc8540575fb15142f7f.tar.gz talos-obmc-linux-04b7d704c6160fa4e8eeffc8540575fb15142f7f.zip |
hwrng: octeon - Use devm_hwrng_register
Use resource managed function devm_hwrng_register instead of
hwrng_register to make the error-path simpler. Also, remove
octeon_rng_remove as it is now redundant.
Signed-off-by: Vaishali Thakkar <vthakkar1994@gmail.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
-rw-r--r-- | drivers/char/hw_random/octeon-rng.c | 12 |
1 files changed, 1 insertions, 11 deletions
diff --git a/drivers/char/hw_random/octeon-rng.c b/drivers/char/hw_random/octeon-rng.c index 6234a4a19b56..8c78aa090492 100644 --- a/drivers/char/hw_random/octeon-rng.c +++ b/drivers/char/hw_random/octeon-rng.c @@ -96,7 +96,7 @@ static int octeon_rng_probe(struct platform_device *pdev) rng->ops = ops; platform_set_drvdata(pdev, &rng->ops); - ret = hwrng_register(&rng->ops); + ret = devm_hwrng_register(&pdev->dev, &rng->ops); if (ret) return -ENOENT; @@ -105,21 +105,11 @@ static int octeon_rng_probe(struct platform_device *pdev) return 0; } -static int octeon_rng_remove(struct platform_device *pdev) -{ - struct hwrng *rng = platform_get_drvdata(pdev); - - hwrng_unregister(rng); - - return 0; -} - static struct platform_driver octeon_rng_driver = { .driver = { .name = "octeon_rng", }, .probe = octeon_rng_probe, - .remove = octeon_rng_remove, }; module_platform_driver(octeon_rng_driver); |