]> git.baikalelectronics.ru Git - kernel.git/commit
HID: vivaldi: fix handling devices not using numbered reports
authorDmitry Torokhov <dmitry.torokhov@gmail.com>
Fri, 7 Jan 2022 20:09:36 +0000 (12:09 -0800)
committerJiri Kosina <jkosina@suse.cz>
Fri, 14 Jan 2022 08:33:17 +0000 (09:33 +0100)
commita22e56f976a1aa09eabf429c02c2695816ba5ff3
tree97b012b9e8313d0c7010d7cd79d7f3a263daf8ec
parentfb1570c0655828194d6460d8f68f0d7914881624
HID: vivaldi: fix handling devices not using numbered reports

Unfortunately details of USB HID transport bled into HID core and
handling of numbered/unnumbered reports is quite a mess, with
hid_report_len() calculating the length according to USB rules,
and hid_hw_raw_request() adding report ID to the buffer for both
numbered and unnumbered reports.

Untangling it all requres a lot of changes in HID, so for now let's
handle this in the driver.

[jkosina@suse.cz: microoptimize field->report->id to report->id]
Fixes: 7053d006b6d3 ("HID: add vivaldi HID driver")
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Tested-by: Stephen Boyd <swboyd@chromium.org> # CoachZ
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
drivers/hid/hid-vivaldi.c