From: Dmitry Torokhov <dmitry.torokhov@gmail.com>
To: Herbert Xu <herbert@gondor.apana.org.au>
Cc: linux-crypto@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH 3/6] hwrng: exynos - make use of devm_hwrng_register
Date: Thu, 12 Mar 2015 14:00:04 -0700 [thread overview]
Message-ID: <1426194007-22182-4-git-send-email-dmitry.torokhov@gmail.com> (raw)
In-Reply-To: <1426194007-22182-1-git-send-email-dmitry.torokhov@gmail.com>
This allows us to get rid of remove() method.
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
---
drivers/char/hw_random/exynos-rng.c | 12 +-----------
1 file changed, 1 insertion(+), 11 deletions(-)
diff --git a/drivers/char/hw_random/exynos-rng.c b/drivers/char/hw_random/exynos-rng.c
index fed0830..dc4701f 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);
--
2.2.0.rc0.207.ga3a616c
next prev parent reply other threads:[~2015-03-12 21:00 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-03-12 21:00 [PATCH 0/6] Introduce devm_hwrng_register and convert a few dirvers Dmitry Torokhov
2015-03-12 21:00 ` [PATCH 1/6] hwrng: add devm_* interfaces Dmitry Torokhov
2015-03-12 21:00 ` [PATCH 2/6] hwrng: bcm63xx - make use of devm_hwrng_register Dmitry Torokhov
2015-03-12 21:00 ` Dmitry Torokhov [this message]
2015-03-12 21:00 ` [PATCH 4/6] hwrng: msm " Dmitry Torokhov
2015-03-12 21:00 ` [PATCH 5/6] hwrng: iproc-rng200 - do not use static structure Dmitry Torokhov
2015-03-12 21:00 ` [PATCH 6/6] hwrng: iproc-rng200 - make use of devm_hwrng_register Dmitry Torokhov
2015-03-16 10:49 ` [PATCH 0/6] Introduce devm_hwrng_register and convert a few dirvers Herbert Xu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1426194007-22182-4-git-send-email-dmitry.torokhov@gmail.com \
--to=dmitry.torokhov@gmail.com \
--cc=herbert@gondor.apana.org.au \
--cc=linux-crypto@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®