drivers/char/applicom.c: proper module_{init,exit}
RFC PATCH 1/1 drivers/char/applicom.c: proper module_{init,exit}
This patch:
- converts the driver to use module_{init,exit}
- let the driver print a warning if the old __setup is used
Signed-off-by Adrian Bunk <[email protected]>
---
This patch was already sent on:
- 15 Apr 2006
drivers/char/applicom.c | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-)
drivers/char/applicom.c renamed from drivers/char/applicom.c.old +6 -11
@@ -166,11 +166,7 @@ static int ac_register_board(unsigned loreturn boardno +1 ; } -#ifdef MODULE - -#define applicom_init init_module - -void cleanup_module (void ) +static void __exit applicom_exit(void) {unsigned int i;
@@ -188,9 +184,7 @@ void cleanup_module(void) } } -#endif /* MODULE */ - -int __init applicom_init (void ) +static int __init applicom_init (void ) {int i, numisa =0 ;struct pci_dev *dev =NULL ;
@@ -358,10 +352,9 @@ out:return ret; } +module_init (applicom_init); +module_exit (applicom_exit); -#ifndef MODULE -__initcall (applicom_init); -#endif static ssize_t ac_write (struct file *file,const char __user *buf,size_t count,loff_t * ppos) {
@@ -870,6 +863,8 @@ static int __init applicom_setup(char *sreturn 0 ; } +printk (KERN_WARNING "applicom= is deprecated\n please use applicom.irq= and applicom.mem=\n" ); + mem = ints[1 ]; irq = ints[2 ];return 1 ;
Quoted 1 line · Adrian Bunk
- converts the driver to use module_{init,exit}
Ack.
Quoted 2 lines
- let the driver print a warning if the old
__setupis used
+printk(KERN_WARNING "applicom= is deprecated\n please use applicom.irq= and applicom.mem=\n");
I wouldn't bother with this -- just change it.
Signature · 1 line
dwmw2