patch-2.3.4 linux/drivers/usb/keyboard.c

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

diff -u --recursive --new-file v2.3.3/linux/drivers/usb/keyboard.c linux/drivers/usb/keyboard.c
@@ -3,6 +3,9 @@
 #include <linux/string.h>
 #include <linux/timer.h>
 #include <linux/sched.h>
+#include <linux/config.h>
+#include <linux/module.h>
+
 #include <linux/kbd_ll.h>
 #include "usb.h"
 
@@ -218,9 +221,21 @@
     printk(KERN_INFO "USB HID boot protocol keyboard removed.\n");
 }
 
-int
-usb_kbd_init(void)
+int usb_kbd_init(void)
 {
     usb_register(&usb_kbd_driver);
     return 0;
 }
+
+#ifdef MODULE
+int init_module(void)
+{
+	return usb_kbd_init();
+}
+
+void module_cleanup(void)
+{
+	usb_deregister(&usb_kbd_driver);
+}
+#endif
+

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