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

Next file: linux/drivers/video/Config.in
Previous file: linux/drivers/usb/usbmouse.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.3.47/linux/drivers/usb/wmforce.c linux/drivers/usb/wmforce.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>");
@@ -149,17 +150,16 @@
 	disconnect:	wmforce_disconnect,
 };
 
-#ifdef MODULE
-void cleanup_module(void)
+static int __init wmforce_init(void)
 {
-	usb_deregister(&wmforce_driver);
+	usb_register(&wmforce_driver);
+	return 0;
 }
 
-int init_module(void)
-#else
-int wmforce_init(void)
-#endif
+static void __exit wmforce_exit(void)
 {
-	usb_register(&wmforce_driver);
-	return 0;
+	usb_deregister(&wmforce_driver);
 }
+
+module_init(wmforce_init);
+module_exit(wmforce_exit);

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