From: Denis Cheng Date: Sun, 15 Jul 2007 08:52:51 +0000 Subject: [PATCH 2/2] add static delaration and init_module fixes Message-Id: <11844896163299-git-send-email-crquan@gmail.com> List-Id: References: <1184489571313-git-send-email-crquan@gmail.com> In-Reply-To: <1184489571313-git-send-email-crquan@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: kernel-janitors@vger.kernel.org Cc: linux-kernel@vger.kernel.org, Denis Cheng 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 --- 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