[parisc-linux-cvs] parport cleanup

Matthew Wilcox willy@ldl.fc.hp.com
Mon, 27 Aug 2001 18:56:49 -0600


 * Combine parport_gsc_init and parport_gsc_init_module -- the code path
   should be the same.
 * Rename parport_gsc_exit_module to parport_gsc_exit.
 * unregister the parisc_driver when we exit.

Index: drivers/parport/parport_gsc.c
===================================================================
RCS file: /home/cvs/parisc/linux/drivers/parport/parport_gsc.c,v
retrieving revision 1.14
diff -u -p -r1.14 parport_gsc.c
--- parport_gsc.c	2001/08/14 16:54:56	1.14
+++ parport_gsc.c	2001/08/28 00:51:20
@@ -510,23 +510,13 @@ static struct parisc_driver parport_driv
 
 int __devinit parport_gsc_init(void)
 {
-	parport_count = 0;
-	
-	register_parisc_driver(&parport_driver);
-
-	return 0;
-}
-
-
-static int __devinit parport_gsc_init_module(void)
-{	
 #if defined(CONFIG_SUPERIO) && defined(CONFIG_PARPORT_PC)
 	superio_parport_init();
 #endif
-	return !parport_gsc_init();
+	register_parisc_driver(&parport_driver);
 }
 
-static void __devexit parport_gsc_exit_module(void)
+static void __devexit parport_gsc_exit(void)
 {
 	struct parport *p = parport_enumerate(), *tmp;
 	while (p) {
@@ -554,9 +544,10 @@ static void __devexit parport_gsc_exit_m
 		}
 		p = tmp;
 	}
+	unregister_parisc_driver(&parport_driver);
 }
 
 EXPORT_NO_SYMBOLS;
 
-module_init(parport_gsc_init_module);
-module_exit(parport_gsc_exit_module);
+module_init(parport_gsc_init);
+module_exit(parport_gsc_exit);