lkml.org 
[lkml]   [2007]   [Jul]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 2/2] add static delaration and init_module fixes
Date
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
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2007-07-15 10:57    [W:0.079 / U:0.900 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site