USB: Use USB defines in usbmouse.c and usbkbd.c
authorMichael Opdenacker <michael-lists@free-electrons.com>
Wed, 21 Feb 2007 21:51:25 +0000 (22:51 +0100)
committerGreg Kroah-Hartman <gregkh@suse.de>
Fri, 23 Feb 2007 23:03:46 +0000 (15:03 -0800)
The below patch proposes to use USB defines (defined in linux/hid.h)
instead of just plain numbers in the USB_INTERFACE_INFO statements.

Signed-off-by: Michael Opdenacker <michael@free-electrons.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/usb/input/usbkbd.c
drivers/usb/input/usbmouse.c

index 8505824..3749f4a 100644 (file)
@@ -31,6 +31,7 @@
 #include <linux/module.h>
 #include <linux/init.h>
 #include <linux/usb/input.h>
+#include <linux/hid.h>
 
 /*
  * Version Information
@@ -330,7 +331,8 @@ static void usb_kbd_disconnect(struct usb_interface *intf)
 }
 
 static struct usb_device_id usb_kbd_id_table [] = {
-       { USB_INTERFACE_INFO(3, 1, 1) },
+       { USB_INTERFACE_INFO(USB_INTERFACE_CLASS_HID, USB_INTERFACE_SUBCLASS_BOOT,
+               USB_INTERFACE_PROTOCOL_KEYBOARD) },
        { }                                             /* Terminating entry */
 };
 
index 64a33e4..692fd60 100644 (file)
@@ -31,6 +31,7 @@
 #include <linux/module.h>
 #include <linux/init.h>
 #include <linux/usb/input.h>
+#include <linux/hid.h>
 
 /*
  * Version Information
@@ -213,7 +214,8 @@ static void usb_mouse_disconnect(struct usb_interface *intf)
 }
 
 static struct usb_device_id usb_mouse_id_table [] = {
-       { USB_INTERFACE_INFO(3, 1, 2) },
+       { USB_INTERFACE_INFO(USB_INTERFACE_CLASS_HID, USB_INTERFACE_SUBCLASS_BOOT,
+               USB_INTERFACE_PROTOCOL_MOUSE) },
        { }     /* Terminating entry */
 };