Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

USB: Use USB defines in usbmouse.c and usbkbd.c

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>

authored by

Michael Opdenacker and committed by
Greg Kroah-Hartman
4ef2e23f 672027a3

+6 -2
+3 -1
drivers/usb/input/usbkbd.c
··· 31 31 #include <linux/module.h> 32 32 #include <linux/init.h> 33 33 #include <linux/usb/input.h> 34 + #include <linux/hid.h> 34 35 35 36 /* 36 37 * Version Information ··· 331 330 } 332 331 333 332 static struct usb_device_id usb_kbd_id_table [] = { 334 - { USB_INTERFACE_INFO(3, 1, 1) }, 333 + { USB_INTERFACE_INFO(USB_INTERFACE_CLASS_HID, USB_INTERFACE_SUBCLASS_BOOT, 334 + USB_INTERFACE_PROTOCOL_KEYBOARD) }, 335 335 { } /* Terminating entry */ 336 336 }; 337 337
+3 -1
drivers/usb/input/usbmouse.c
··· 31 31 #include <linux/module.h> 32 32 #include <linux/init.h> 33 33 #include <linux/usb/input.h> 34 + #include <linux/hid.h> 34 35 35 36 /* 36 37 * Version Information ··· 214 213 } 215 214 216 215 static struct usb_device_id usb_mouse_id_table [] = { 217 - { USB_INTERFACE_INFO(3, 1, 2) }, 216 + { USB_INTERFACE_INFO(USB_INTERFACE_CLASS_HID, USB_INTERFACE_SUBCLASS_BOOT, 217 + USB_INTERFACE_PROTOCOL_MOUSE) }, 218 218 { } /* Terminating entry */ 219 219 }; 220 220