From: Vaishali Thakkar <vthakkar1994@gmail.com>
To: Mathieu Poirier <mathieu.poirier@linaro.org>
Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org
Subject: [PATCH v2] coresight: replicator: Use module_platform_driver
Date: Fri, 10 Jul 2015 01:29:44 +0530 [thread overview]
Message-ID: <20150709195944.GA4470@vaishali-Ideapad-Z570> (raw)
Use module_platform_driver for drivers whose init and exit functions
only register and unregister, respectively.
Signed-off-by: Vaishali Thakkar <vthakkar1994@gmail.com>
---
Changes since v1:
- As per Mathieu's suggestion, remove the comment and
code of Coccinelle
- Also, add blank line before module_platform_driver
---
drivers/hwtracing/coresight/coresight-replicator.c | 12 +-----------
1 file changed, 1 insertion(+), 11 deletions(-)
diff --git a/drivers/hwtracing/coresight/coresight-replicator.c b/drivers/hwtracing/coresight/coresight-replicator.c
index 7974b7c..9c18bb5 100644
--- a/drivers/hwtracing/coresight/coresight-replicator.c
+++ b/drivers/hwtracing/coresight/coresight-replicator.c
@@ -184,17 +184,7 @@ static struct platform_driver replicator_driver = {
},
};
-static int __init replicator_init(void)
-{
- return platform_driver_register(&replicator_driver);
-}
-module_init(replicator_init);
-
-static void __exit replicator_exit(void)
-{
- platform_driver_unregister(&replicator_driver);
-}
-module_exit(replicator_exit);
+module_platform_driver(replicator_driver);
MODULE_LICENSE("GPL v2");
MODULE_DESCRIPTION("CoreSight Replicator driver");
--
1.9.1
next reply other threads:[~2015-07-09 19:59 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-07-09 19:59 Vaishali Thakkar [this message]
2015-07-09 20:19 ` Paul Bolle
2015-07-10 3:23 ` Vaishali Thakkar
2015-07-10 9:00 ` Paul Bolle
2015-07-10 11:47 ` Vaishali Thakkar
2015-07-10 14:30 ` Mathieu Poirier
2015-07-10 15:51 ` Vaishali Thakkar
2015-07-13 15:31 ` Mathieu Poirier
2015-07-14 11:49 ` Vaishali Thakkar
2015-07-14 15:22 ` Mathieu Poirier
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=20150709195944.GA4470@vaishali-Ideapad-Z570 \
--to=vthakkar1994@gmail.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mathieu.poirier@linaro.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®