HID: hidraw: fix numbered reports
authorAlan Ott <[email protected]>
Mon, 26 Apr 2010 22:34:46 +0000 (18:34 -0400)
committerJiri Kosina <[email protected]>
Tue, 27 Apr 2010 08:22:53 +0000 (10:22 +0200)
Make hidraw not stick an extra byte on the beginning of an IN transfer
when a HID device contains multiple reports.

Signed-off-by: Alan Ott <[email protected]>
Acked-by: Jiri Slaby <[email protected]>
Signed-off-by: Jiri Kosina <[email protected]>
drivers/hid/hid-core.c

index d25152baf5f813401b74fe8a1b46212aa78bc5c6..143e788b729b1bdaadb4888e3568dac3a6714b0c 100644 (file)
@@ -1043,13 +1043,8 @@ void hid_report_raw_event(struct hid_device *hid, int type, u8 *data, int size,
 
        if ((hid->claimed & HID_CLAIMED_HIDDEV) && hid->hiddev_report_event)
                hid->hiddev_report_event(hid, report);
-       if (hid->claimed & HID_CLAIMED_HIDRAW) {
-               /* numbered reports need to be passed with the report num */
-               if (report_enum->numbered)
-                       hidraw_report_event(hid, data - 1, size + 1);
-               else
-                       hidraw_report_event(hid, data, size);
-       }
+       if (hid->claimed & HID_CLAIMED_HIDRAW)
+               hidraw_report_event(hid, data, size);
 
        for (a = 0; a < report->maxfield; a++)
                hid_input_field(hid, report->field[a], cdata, interrupt);