summaryrefslogtreecommitdiffstats
path: root/drivers/char
diff options
context:
space:
mode:
authorDmitry Torokhov <dmitry.torokhov@gmail.com>2015-03-12 14:00:07 -0700
committerHerbert Xu <herbert@gondor.apana.org.au>2015-03-16 21:45:56 +1100
commit73b3862127e71d8cc7677b07ccc5adff0c0179bd (patch)
treeec8ea359b1954d60ccc51bd0aa5039f9a8dc3e9a /drivers/char
parentef0a1b26499f61b2453dd0c454aedee687edf31c (diff)
downloadlinux-73b3862127e71d8cc7677b07ccc5adff0c0179bd.tar.bz2
hwrng: iproc-rng200 - make use of devm_hwrng_register
This allows us to get rid of driver's 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/char')
-rw-r--r--drivers/char/hw_random/iproc-rng200.c15
1 files changed, 1 insertions, 14 deletions
diff --git a/drivers/char/hw_random/iproc-rng200.c b/drivers/char/hw_random/iproc-rng200.c
index 2dbaf5c52f35..3eaf7cb96d36 100644
--- a/drivers/char/hw_random/iproc-rng200.c
+++ b/drivers/char/hw_random/iproc-rng200.c
@@ -208,29 +208,17 @@ static int iproc_rng200_probe(struct platform_device *pdev)
priv->rng.cleanup = iproc_rng200_cleanup,
/* Register driver */
- ret = hwrng_register(&priv->rng);
+ ret = devm_hwrng_register(dev, &priv->rng);
if (ret) {
dev_err(dev, "hwrng registration failed\n");
return ret;
}
- platform_set_drvdata(pdev, priv);
-
dev_info(dev, "hwrng registered\n");
return 0;
}
-static int iproc_rng200_remove(struct platform_device *pdev)
-{
- struct iproc_rng200_dev *priv = platform_get_drvdata(pdev);
-
- /* Unregister driver */
- hwrng_unregister(&priv->rng);
-
- return 0;
-}
-
static const struct of_device_id iproc_rng200_of_match[] = {
{ .compatible = "brcm,iproc-rng200", },
{},
@@ -243,7 +231,6 @@ static struct platform_driver iproc_rng200_driver = {
.of_match_table = iproc_rng200_of_match,
},
.probe = iproc_rng200_probe,
- .remove = iproc_rng200_remove,
};
module_platform_driver(iproc_rng200_driver);