aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAdrian Bunk <bunk@stusta.de>2006-06-25 08:47:34 -0400
committerLinus Torvalds <torvalds@g5.osdl.org>2006-06-25 13:01:05 -0400
commit2e6113908fe76a06295cb243f1f2f0eea055b0c2 (patch)
tree4c96b49de408c0813a148db1e5c35c4acf1f0dc6
parent59cc185ada89245204c658ebcf64422968736672 (diff)
[PATCH] drivers/char/applicom.c: proper module_{init,exit}
Convert the driver to use module_{init,exit}. Signed-off-by: Adrian Bunk <bunk@stusta.de> Acked-by: David Woodhouse <dwmw2@infradead.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-rw-r--r--drivers/char/applicom.c40
1 files changed, 4 insertions, 36 deletions
diff --git a/drivers/char/applicom.c b/drivers/char/applicom.c
index a370e7a0bad5..9275d5e52e6d 100644
--- a/drivers/char/applicom.c
+++ b/drivers/char/applicom.c
@@ -166,11 +166,7 @@ static int ac_register_board(unsigned long physloc, void __iomem *loc,
166 return boardno + 1; 166 return boardno + 1;
167} 167}
168 168
169#ifdef MODULE 169static void __exit applicom_exit(void)
170
171#define applicom_init init_module
172
173void cleanup_module(void)
174{ 170{
175 unsigned int i; 171 unsigned int i;
176 172
@@ -188,9 +184,7 @@ void cleanup_module(void)
188 } 184 }
189} 185}
190 186
191#endif /* MODULE */ 187static int __init applicom_init(void)
192
193int __init applicom_init(void)
194{ 188{
195 int i, numisa = 0; 189 int i, numisa = 0;
196 struct pci_dev *dev = NULL; 190 struct pci_dev *dev = NULL;
@@ -355,10 +349,9 @@ out:
355 return ret; 349 return ret;
356} 350}
357 351
352module_init(applicom_init);
353module_exit(applicom_exit);
358 354
359#ifndef MODULE
360__initcall(applicom_init);
361#endif
362 355
363static ssize_t ac_write(struct file *file, const char __user *buf, size_t count, loff_t * ppos) 356static ssize_t ac_write(struct file *file, const char __user *buf, size_t count, loff_t * ppos)
364{ 357{
@@ -851,28 +844,3 @@ static int ac_ioctl(struct inode *inode, struct file *file, unsigned int cmd, un
851 return 0; 844 return 0;
852} 845}
853 846
854#ifndef MODULE
855static int __init applicom_setup(char *str)
856{
857 int ints[4];
858
859 (void) get_options(str, 4, ints);
860
861 if (ints[0] > 2) {
862 printk(KERN_WARNING "Too many arguments to 'applicom=', expected mem,irq only.\n");
863 }
864
865 if (ints[0] < 2) {
866 printk(KERN_INFO"applicom numargs: %d\n", ints[0]);
867 return 0;
868 }
869
870 mem = ints[1];
871 irq = ints[2];
872 return 1;
873}
874
875__setup("applicom=", applicom_setup);
876
877#endif /* MODULE */
878