diff options
author | Alan Ott <alan@signal11.us> | 2010-04-26 18:34:46 -0400 |
---|---|---|
committer | Jiri Kosina <jkosina@suse.cz> | 2010-04-27 04:22:53 -0400 |
commit | 5a38f2c7c4dd53d5be097930902c108e362584a3 (patch) | |
tree | d20f7b3b4ec95df073c670bfa5f592ad86a73183 | |
parent | c85b86a6dc7b5b4607c3a14fdbda78df06b5c79f (diff) |
HID: hidraw: fix numbered reports
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 <alan@signal11.us>
Acked-by: Jiri Slaby <jslaby@suse.cz>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
-rw-r--r-- | drivers/hid/hid-core.c | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/drivers/hid/hid-core.c b/drivers/hid/hid-core.c index d25152baf5f8..143e788b729b 100644 --- a/drivers/hid/hid-core.c +++ b/drivers/hid/hid-core.c | |||
@@ -1043,13 +1043,8 @@ void hid_report_raw_event(struct hid_device *hid, int type, u8 *data, int size, | |||
1043 | 1043 | ||
1044 | if ((hid->claimed & HID_CLAIMED_HIDDEV) && hid->hiddev_report_event) | 1044 | if ((hid->claimed & HID_CLAIMED_HIDDEV) && hid->hiddev_report_event) |
1045 | hid->hiddev_report_event(hid, report); | 1045 | hid->hiddev_report_event(hid, report); |
1046 | if (hid->claimed & HID_CLAIMED_HIDRAW) { | 1046 | if (hid->claimed & HID_CLAIMED_HIDRAW) |
1047 | /* numbered reports need to be passed with the report num */ | 1047 | hidraw_report_event(hid, data, size); |
1048 | if (report_enum->numbered) | ||
1049 | hidraw_report_event(hid, data - 1, size + 1); | ||
1050 | else | ||
1051 | hidraw_report_event(hid, data, size); | ||
1052 | } | ||
1053 | 1048 | ||
1054 | for (a = 0; a < report->maxfield; a++) | 1049 | for (a = 0; a < report->maxfield; a++) |
1055 | hid_input_field(hid, report->field[a], cdata, interrupt); | 1050 | hid_input_field(hid, report->field[a], cdata, interrupt); |