diff options
Diffstat (limited to 'drivers/char/applicom.c')
-rw-r--r-- | drivers/char/applicom.c | 49 |
1 files changed, 10 insertions, 39 deletions
diff --git a/drivers/char/applicom.c b/drivers/char/applicom.c index a370e7a0bad5..72fb60765c45 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 | 169 | static void __exit applicom_exit(void) |
170 | |||
171 | #define applicom_init init_module | ||
172 | |||
173 | void 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 */ | 187 | static int __init applicom_init(void) |
192 | |||
193 | int __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; |
@@ -215,13 +209,16 @@ int __init applicom_init(void) | |||
215 | RamIO = ioremap(dev->resource[0].start, LEN_RAM_IO); | 209 | RamIO = ioremap(dev->resource[0].start, LEN_RAM_IO); |
216 | 210 | ||
217 | if (!RamIO) { | 211 | if (!RamIO) { |
218 | printk(KERN_INFO "ac.o: Failed to ioremap PCI memory space at 0x%lx\n", dev->resource[0].start); | 212 | printk(KERN_INFO "ac.o: Failed to ioremap PCI memory " |
213 | "space at 0x%llx\n", | ||
214 | (unsigned long long)dev->resource[0].start); | ||
219 | pci_disable_device(dev); | 215 | pci_disable_device(dev); |
220 | return -EIO; | 216 | return -EIO; |
221 | } | 217 | } |
222 | 218 | ||
223 | printk(KERN_INFO "Applicom %s found at mem 0x%lx, irq %d\n", | 219 | printk(KERN_INFO "Applicom %s found at mem 0x%llx, irq %d\n", |
224 | applicom_pci_devnames[dev->device-1], dev->resource[0].start, | 220 | applicom_pci_devnames[dev->device-1], |
221 | (unsigned long long)dev->resource[0].start, | ||
225 | dev->irq); | 222 | dev->irq); |
226 | 223 | ||
227 | boardno = ac_register_board(dev->resource[0].start, RamIO,0); | 224 | boardno = ac_register_board(dev->resource[0].start, RamIO,0); |
@@ -355,10 +352,9 @@ out: | |||
355 | return ret; | 352 | return ret; |
356 | } | 353 | } |
357 | 354 | ||
355 | module_init(applicom_init); | ||
356 | module_exit(applicom_exit); | ||
358 | 357 | ||
359 | #ifndef MODULE | ||
360 | __initcall(applicom_init); | ||
361 | #endif | ||
362 | 358 | ||
363 | static ssize_t ac_write(struct file *file, const char __user *buf, size_t count, loff_t * ppos) | 359 | static ssize_t ac_write(struct file *file, const char __user *buf, size_t count, loff_t * ppos) |
364 | { | 360 | { |
@@ -851,28 +847,3 @@ static int ac_ioctl(struct inode *inode, struct file *file, unsigned int cmd, un | |||
851 | return 0; | 847 | return 0; |
852 | } | 848 | } |
853 | 849 | ||
854 | #ifndef MODULE | ||
855 | static 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 | |||