From: Lokesh Vutla <lokeshvutla@ti.com>
To: <linux-omap@vger.kernel.org>
Cc: dsaxena@plexity.net, Lokesh Vutla <lokeshvutla@ti.com>,
herbert@gondor.hengli.com.au, linux-crypto@vger.kernel.org,
mpm@selenic.com, linux-arm-kernel@lists.infradead.org
Subject: [PATCH 1/6] hwrng: OMAP: Use module_platform_driver macro
Date: Mon, 5 Aug 2013 20:17:18 +0530 [thread overview]
Message-ID: <1375714043-23407-2-git-send-email-lokeshvutla@ti.com> (raw)
In-Reply-To: <1375714043-23407-1-git-send-email-lokeshvutla@ti.com>
module_platform_driver() makes the code simpler.
Using the macro in the driver.
Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
---
drivers/char/hw_random/omap-rng.c | 18 ++----------------
1 file changed, 2 insertions(+), 16 deletions(-)
diff --git a/drivers/char/hw_random/omap-rng.c b/drivers/char/hw_random/omap-rng.c
index 6843ec8..3e9a7ec 100644
--- a/drivers/char/hw_random/omap-rng.c
+++ b/drivers/char/hw_random/omap-rng.c
@@ -198,9 +198,6 @@ static SIMPLE_DEV_PM_OPS(omap_rng_pm, omap_rng_suspend, omap_rng_resume);
#endif
-/* work with hotplug and coldplug */
-MODULE_ALIAS("platform:omap_rng");
-
static struct platform_driver omap_rng_driver = {
.driver = {
.name = "omap_rng",
@@ -211,18 +208,7 @@ static struct platform_driver omap_rng_driver = {
.remove = __exit_p(omap_rng_remove),
};
-static int __init omap_rng_init(void)
-{
- return platform_driver_register(&omap_rng_driver);
-}
-
-static void __exit omap_rng_exit(void)
-{
- platform_driver_unregister(&omap_rng_driver);
-}
-
-module_init(omap_rng_init);
-module_exit(omap_rng_exit);
-
+module_platform_driver(omap_rng_driver);
+MODULE_ALIAS("platform:omap_rng");
MODULE_AUTHOR("Deepak Saxena (and others)");
MODULE_LICENSE("GPL");
--
1.7.9.5
next prev parent reply other threads:[~2013-08-05 14:47 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-08-05 14:47 [PATCH 0/6] hwrng: OMAP: Updates for OMAP RNG module Lokesh Vutla
2013-08-05 14:47 ` Lokesh Vutla [this message]
2013-08-05 14:47 ` [PATCH 2/6] hwrng: OMAP: Convert to devm_kzalloc() Lokesh Vutla
2013-08-05 14:47 ` [PATCH 3/6] hwrng: OMAP: Remove duplicated function call Lokesh Vutla
2013-08-05 14:47 ` [PATCH 4/6] hwrng: OMAP: Add device tree support Lokesh Vutla
2013-08-05 14:47 ` [PATCH 5/6] ARM: OMAP2+: Only manually add hwmod data when DT not used Lokesh Vutla
2013-08-05 14:47 ` [PATCH 6/6] hwrng: OMAP: Add OMAP4 TRNG support Lokesh Vutla
2013-08-09 6:42 ` [PATCH 0/6] hwrng: OMAP: Updates for OMAP RNG module 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=1375714043-23407-2-git-send-email-lokeshvutla@ti.com \
--to=lokeshvutla@ti.com \
--cc=dsaxena@plexity.net \
--cc=herbert@gondor.hengli.com.au \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-crypto@vger.kernel.org \
--cc=linux-omap@vger.kernel.org \
--cc=mpm@selenic.com \
/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