diff mbox

[v4,1/2] HID: Add Support for Setting and Getting Feature Reports from hidraw

Message ID 20101001000309.9bb53de4.ospite@studenti.unina.it (mailing list archive)
State Deferred
Headers show

Commit Message

Antonio Ospite Sept. 30, 2010, 10:03 p.m. UTC
None
diff mbox

Patch

diff --git a/drivers/hid/usbhid/hid-core.c b/drivers/hid/usbhid/hid-core.c
index df80532..83e1b48 100644
--- a/drivers/hid/usbhid/hid-core.c
+++ b/drivers/hid/usbhid/hid-core.c
@@ -875,6 +875,9 @@  static int usbhid_output_raw_report(struct hid_device *hid, __u8 *buf, size_t co
                        ((report_type + 1) << 8) | report_id,
                        interface->desc.bInterfaceNumber, buf, count,
                        USB_CTRL_SET_TIMEOUT);
+               /* restore report ID into the buffer, some non conformant usb
+                * device could have mangled it */
+               buf[0] = report_id;
                /* count also the report id, if this was a numbered report. */
                if (ret > 0 && skipped_report_id)
                        ret++;