diff mbox

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

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

Commit Message

Antonio Ospite Oct. 2, 2010, midnight UTC
None
diff mbox

Patch

diff --git a/drivers/hid/usbhid/hid-core.c b/drivers/hid/usbhid/hid-core.c
index df80532..c6648d3 100644
--- a/drivers/hid/usbhid/hid-core.c
+++ b/drivers/hid/usbhid/hid-core.c
@@ -825,6 +825,11 @@  static int usbhid_get_raw_report(struct hid_device *hid,
                interface->desc.bInterfaceNumber, buf, count,
                USB_CTRL_SET_TIMEOUT);

+       /* restore report number into buf[0],
+        * some non conformant device might be mangling it
+        */
+       buf[0] = report_number;
+
        /* count also the report id */
        if (ret > 0 && skipped_report_id)
                ret++;