[PATCH 2/2] add static delaration and init_module fixes

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 <[email protected]>
---
 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 [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux