Skip to content

Commit

Permalink
USB: Use USB defines in usbmouse.c and usbkbd.c
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Michael Opdenacker authored and Greg Kroah-Hartman committed Feb 23, 2007
1 parent 672027a commit 4ef2e23
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 3 additions & 1 deletion drivers/usb/input/usbkbd.c
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
#include <linux/module.h>
#include <linux/init.h>
#include <linux/usb/input.h>
#include <linux/hid.h>

/*
* Version Information
Expand Down Expand Up @@ -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 */
};

Expand Down
4 changes: 3 additions & 1 deletion drivers/usb/input/usbmouse.c
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
#include <linux/module.h>
#include <linux/init.h>
#include <linux/usb/input.h>
#include <linux/hid.h>

/*
* Version Information
Expand Down Expand Up @@ -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 */
};

Expand Down

0 comments on commit 4ef2e23

Please sign in to comment.