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

Next file: linux/drivers/usb/wmforce.c
Previous file: linux/drivers/usb/usbkbd.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.3.47/linux/drivers/usb/usbmouse.c linux/drivers/usb/usbmouse.c
@@ -32,6 +32,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>");
@@ -132,18 +133,16 @@
 	disconnect:	usb_mouse_disconnect,
 };
 
-#ifdef MODULE
-void cleanup_module(void)
+static int __init usb_mouse_init(void)
 {
-	usb_deregister(&usb_mouse_driver);
+	usb_register(&usb_mouse_driver);
+	return 0;
 }
 
-int init_module(void)
-#else
-int usb_mouse_init(void)
-#endif
+static void __exit usb_mouse_exit(void)
 {
-	usb_register(&usb_mouse_driver);
-	return 0;
+	usb_deregister(&usb_mouse_driver);
 }
 
+module_init(usb_mouse_init);
+module_exit(usb_mouse_exit);

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