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

Next file: linux/drivers/usb/usbmouse.c
Previous file: linux/drivers/usb/usb-storage-debug.h
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.3.47/linux/drivers/usb/usbkbd.c linux/drivers/usb/usbkbd.c
@@ -32,6 +32,7 @@
 #include <linux/malloc.h>
 #include <linux/module.h>
 #include <linux/input.h>
+#include <linux/init.h>
 #include "usb.h"
 
 MODULE_AUTHOR("Vojtech Pavlik <vojtech@suse.cz>");
@@ -202,17 +203,16 @@
 	disconnect:	usb_kbd_disconnect
 };
 
-#ifdef MODULE
-void cleanup_module(void)
+static int __init usb_kbd_init(void)
 {
-	usb_deregister(&usb_kbd_driver);
+	usb_register(&usb_kbd_driver);
+	return 0;
 }
 
-int init_module(void)
-#else
-int usb_kbd_init(void)
-#endif
+static void __exit usb_kbd_exit(void)
 {
-	usb_register(&usb_kbd_driver);
-	return 0;
+	usb_deregister(&usb_kbd_driver);
 }
+
+module_init(usb_kbd_init);
+module_exit(usb_kbd_exit);

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