From: Denis Cheng <crquan@gmail.com>
To: kernel-janitors@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, Denis Cheng <crquan@gmail.com>
Subject: [PATCH 2/2] add static delaration and init_module fixes
Date: Sun, 15 Jul 2007 16:52:51 +0800 [thread overview]
Message-ID: <11844896163299-git-send-email-crquan@gmail.com> (raw)
In-Reply-To: <1184489571313-git-send-email-crquan@gmail.com>
As stated by kernel janitors TODO list:
Remove unneeded historic code / New API conversions.
- get rid of init_module / cleanup_module
and with the __init / __exit code section declarations,
the #ifdef MODULE #endif is not needed any more.
Signed-off-by: Denis Cheng <crquan@gmail.com>
---
drivers/net/wireless/wavelan.c | 9 +++++----
1 files changed, 5 insertions(+), 4 deletions(-)
diff --git a/drivers/net/wireless/wavelan.c b/drivers/net/wireless/wavelan.c
index 796011b..392c54c 100644
--- a/drivers/net/wireless/wavelan.c
+++ b/drivers/net/wireless/wavelan.c
@@ -4235,13 +4235,12 @@ struct net_device *__init wavelan_probe(int unit)
* Module entry point: insertion and removal
*/
-#ifdef MODULE
/*------------------------------------------------------------------*/
/*
* Insertion of the module
* I'm now quite proud of the multi-device support.
*/
-int __init init_module(void)
+static int __init wavelan_init(void)
{
int ret = -EIO; /* Return error if no cards found */
int i;
@@ -4303,7 +4302,7 @@ int __init init_module(void)
/*
* Removal of the module
*/
-void cleanup_module(void)
+static void __exit wavelan_exit(void)
{
#ifdef DEBUG_MODULE_TRACE
printk(KERN_DEBUG "-> cleanup_module()\n");
@@ -4330,7 +4329,9 @@ void cleanup_module(void)
printk(KERN_DEBUG "<- cleanup_module()\n");
#endif
}
-#endif /* MODULE */
+
+module_init(wavelan_init);
+module_exit(wavelan_exit);
MODULE_LICENSE("GPL");
/*
--
1.5.2.2
next prev parent reply other threads:[~2007-07-15 8:54 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-07-15 8:52 [PATCH 1/2] run scripts/Lindent on it to match Documentation/CodingStyle Denis Cheng
2007-07-15 8:52 ` Denis Cheng [this message]
2007-07-15 9:20 ` Christoph Hellwig
2007-07-15 9:53 ` Simon Arlott
2007-07-20 17:07 ` Matthew Wilcox
2007-07-20 17:36 ` Simon Arlott
2007-07-20 18:00 ` Matthew Wilcox
2007-07-21 6:11 ` Simon Arlott
2007-07-21 13:47 ` rae l
2007-07-21 13:52 ` Matthew Wilcox
2007-07-21 19:17 ` diffutils: C labels misdetected as functions (Was: [PATCH 1/2] run scripts/Lindent on it to match Documentation/CodingStyle) Simon Arlott
2007-07-22 18:38 ` diffutils: C labels misdetected as functions Paul Eggert
2007-07-22 19:16 ` Simon Arlott
2007-07-22 21:30 ` Junio C Hamano
2007-07-21 6:12 ` [PATCH 1/2] run scripts/Lindent on it to match Documentation/CodingStyle Simon Arlott
2007-07-20 20:50 ` Oleg Verych
2007-07-20 20:54 ` Matthew Wilcox
2007-07-21 4:32 ` Fixing lables after GNU indent (Re: [PATCH 1/2] run scripts/Lindent on it to match Documentation/CodingStyle) Oleg Verych
2007-07-21 16:17 ` [PATCH 1/2] run scripts/Lindent on it to match Documentation/CodingStyle Jan Engelhardt
2007-07-20 17:33 ` Matthew Wilcox
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=11844896163299-git-send-email-crquan@gmail.com \
--to=crquan@gmail.com \
--cc=kernel-janitors@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