Commit 32f05867 authored by Alan Cox's avatar Alan Cox Committed by Linus Torvalds

[PATCH] fix tpqic02 + tidy it up

parent e4b0a4f2
...@@ -697,9 +697,6 @@ int __init chr_dev_init(void) ...@@ -697,9 +697,6 @@ int __init chr_dev_init(void)
lp_m68k_init(); lp_m68k_init();
#endif #endif
misc_init(); misc_init();
#if CONFIG_QIC02_TAPE
qic02_tape_init();
#endif
#ifdef CONFIG_FTAPE #ifdef CONFIG_FTAPE
ftape_init(); ftape_init();
#endif #endif
......
...@@ -2759,9 +2759,7 @@ int __init qic02_tape_init(void) ...@@ -2759,9 +2759,7 @@ int __init qic02_tape_init(void)
return 0; return 0;
} /* qic02_tape_init */ } /* qic02_tape_init */
#ifdef MODULE static void qic02_module_exit(void)
void cleanup_module(void)
{ {
unregister_chrdev(QIC02_TAPE_MAJOR, TPQIC02_NAME); unregister_chrdev(QIC02_TAPE_MAJOR, TPQIC02_NAME);
if (status_zombie == NO) if (status_zombie == NO)
...@@ -2777,7 +2775,7 @@ void cleanup_module(void) ...@@ -2777,7 +2775,7 @@ void cleanup_module(void)
devfs_remove("tpqic150"); devfs_remove("tpqic150");
} }
int init_module(void) static int qic02_module_init(void)
{ {
int retval; int retval;
retval = qic02_tape_init(); retval = qic02_tape_init();
...@@ -2788,12 +2786,14 @@ int init_module(void) ...@@ -2788,12 +2786,14 @@ int init_module(void)
if (!retval && qic02_tape_dynconf.ifc_type) { if (!retval && qic02_tape_dynconf.ifc_type) {
retval = update_ifc_masks(qic02_tape_dynconf.ifc_type); retval = update_ifc_masks(qic02_tape_dynconf.ifc_type);
if (retval) { if (retval) {
cleanup_module(); qic02_module_exit();
} }
} }
# endif # endif
return retval; return retval;
} }
#endif
MODULE_LICENSE("GPL"); MODULE_LICENSE("GPL");
module_init(qic02_module_init);
module_exit(qic02_module_exit);
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment