[PATCH 2/2] add static delaration and init_module fixes
From: Denis Cheng
Date: Sun Jul 15 2007 - 04:54:43 EST
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@xxxxxxxxx>
---
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@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/