From: Devendra Naga <develkernel412222@gmail.com>
To: linux-kernel@vger.kernel.org
Cc: David Brownell <david-b@pacbell.net>, <justin.waters@timesys.com>,
<a.zummo@towertech.it>, Andrew Morton <akpm@linux-foundation.org>,
Devendra Naga <develkernel412222@gmail.com>
Subject: [PATCH] rtc/at91sam9: use module_platform_driver macro
Date: Fri, 3 Aug 2012 14:11:40 +0545 [thread overview]
Message-ID: <1343982400-17245-1-git-send-email-develkernel412222@gmail.com> (raw)
This driver does seems to do only platform_driver_register in the
init function and platform_driver_unregister in the exit function,
so replace all this code including the module_init and module_exit with
module_platform_driver macro...
Signed-off-by: Devendra Naga <develkernel412222@gmail.com>
---
drivers/rtc/rtc-at91sam9.c | 13 +------------
1 file changed, 1 insertion(+), 12 deletions(-)
diff --git a/drivers/rtc/rtc-at91sam9.c b/drivers/rtc/rtc-at91sam9.c
index 8318689..1063ea1 100644
--- a/drivers/rtc/rtc-at91sam9.c
+++ b/drivers/rtc/rtc-at91sam9.c
@@ -465,18 +465,7 @@ static struct platform_driver at91_rtc_driver = {
},
};
-static int __init at91_rtc_init(void)
-{
- return platform_driver_register(&at91_rtc_driver);
-}
-module_init(at91_rtc_init);
-
-static void __exit at91_rtc_exit(void)
-{
- platform_driver_unregister(&at91_rtc_driver);
-}
-module_exit(at91_rtc_exit);
-
+module_platform_driver(at91_rtc_driver);
MODULE_AUTHOR("Michel Benoit");
MODULE_DESCRIPTION("RTC driver for Atmel AT91SAM9x");
--
1.7.9.5
reply other threads:[~2012-08-03 8:27 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=1343982400-17245-1-git-send-email-develkernel412222@gmail.com \
--to=develkernel412222@gmail.com \
--cc=a.zummo@towertech.it \
--cc=akpm@linux-foundation.org \
--cc=david-b@pacbell.net \
--cc=justin.waters@timesys.com \
--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