aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/hid/usbhid/hid-core.c
diff options
context:
space:
mode:
authorJiri Kosina <jkosina@suse.cz>2010-09-24 08:03:37 -0400
committerJiri Kosina <jkosina@suse.cz>2010-09-24 08:03:37 -0400
commit73e6d6c6467771838c1fc6949e6768a12ed72464 (patch)
tree94dd60891869a0a275cd332c4e675cf0b101fcfa /drivers/hid/usbhid/hid-core.c
parent12e5272585901217e919da810c801e5084ee0cb1 (diff)
parenta850ea30374ebed32a0724742601861853fde869 (diff)
Merge branch 'master' into upstream
Diffstat (limited to 'drivers/hid/usbhid/hid-core.c')
-rw-r--r--drivers/hid/usbhid/hid-core.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/drivers/hid/usbhid/hid-core.c b/drivers/hid/usbhid/hid-core.c
index ff90069f4a69..c90fbbdbffa2 100644
--- a/drivers/hid/usbhid/hid-core.c
+++ b/drivers/hid/usbhid/hid-core.c
@@ -829,6 +829,7 @@ static int usbhid_output_raw_report(struct hid_device *hid, __u8 *buf, size_t co
829 } 829 }
830 } else { 830 } else {
831 int skipped_report_id = 0; 831 int skipped_report_id = 0;
832 int report_id = buf[0];
832 if (buf[0] == 0x0) { 833 if (buf[0] == 0x0) {
833 /* Don't send the Report ID */ 834 /* Don't send the Report ID */
834 buf++; 835 buf++;
@@ -838,7 +839,7 @@ static int usbhid_output_raw_report(struct hid_device *hid, __u8 *buf, size_t co
838 ret = usb_control_msg(dev, usb_sndctrlpipe(dev, 0), 839 ret = usb_control_msg(dev, usb_sndctrlpipe(dev, 0),
839 HID_REQ_SET_REPORT, 840 HID_REQ_SET_REPORT,
840 USB_DIR_OUT | USB_TYPE_CLASS | USB_RECIP_INTERFACE, 841 USB_DIR_OUT | USB_TYPE_CLASS | USB_RECIP_INTERFACE,
841 ((report_type + 1) << 8) | *buf, 842 ((report_type + 1) << 8) | report_id,
842 interface->desc.bInterfaceNumber, buf, count, 843 interface->desc.bInterfaceNumber, buf, count,
843 USB_CTRL_SET_TIMEOUT); 844 USB_CTRL_SET_TIMEOUT);
844 /* count also the report id, if this was a numbered report. */ 845 /* count also the report id, if this was a numbered report. */
@@ -1446,6 +1447,11 @@ static const struct hid_device_id hid_usb_table[] = {
1446 { } 1447 { }
1447}; 1448};
1448 1449
1450struct usb_interface *usbhid_find_interface(int minor)
1451{
1452 return usb_find_interface(&hid_driver, minor);
1453}
1454
1449static struct hid_driver hid_usb_driver = { 1455static struct hid_driver hid_usb_driver = {
1450 .name = "generic-usb", 1456 .name = "generic-usb",
1451 .id_table = hid_usb_table, 1457 .id_table = hid_usb_table,