patch-2.3.48 linux/drivers/usb/graphire.c

Next file: linux/drivers/usb/hid.c
Previous file: linux/drivers/usb/ftdi_sio.h
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.3.47/linux/drivers/usb/graphire.c linux/drivers/usb/graphire.c
@@ -37,6 +37,7 @@
 #include <linux/malloc.h>
 #include <linux/input.h>
 #include <linux/module.h>
+#include <linux/init.h>
 #include "usb.h"
 
 MODULE_AUTHOR("Vojtech Pavlik <vojtech@suse.cz>");
@@ -179,17 +180,16 @@
 	disconnect:	graphire_disconnect,
 };
 
-#ifdef MODULE
-void cleanup_module(void)
+static int __init graphire_init(void)
 {
-	usb_deregister(&graphire_driver);
+	usb_register(&graphire_driver);
+	return 0;
 }
 
-int init_module(void)
-#else
-int graphire_init(void)
-#endif
+static void __exit graphire_exit(void)
 {
-	usb_register(&graphire_driver);
-	return 0;
+	usb_deregister(&graphire_driver);
 }
+
+module_init(graphire_init);
+module_exit(graphire_exit);

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)