HID: logitech-hidpp: do not hardcode very long report length
authorHans de Goede <hdegoede@redhat.com>
Sat, 20 Apr 2019 11:22:12 +0000 (13:22 +0200)
committerBenjamin Tissoires <benjamin.tissoires@redhat.com>
Tue, 23 Apr 2019 16:02:52 +0000 (18:02 +0200)
commitd71b18f7c7999381a9b721d761b0aceffdcd65da
treee370ed078af2640017bd05a0d66499b54520d4cb
parent754a30884886d751ea8b5681a8ccaad59147a914
HID: logitech-hidpp: do not hardcode very long report length

The HID++ spec says the following about the very long report length:
"n Bytes, depends on HID++ collection declaration".

Hardcoding this breaks talking to some HID++ devices over BlueTooth, since
they declare only 45 bytes data for the very long report, rather then the
hardcoded 63.

This commit fixes this by getting the actual report length from the
descriptors.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
drivers/hid/hid-logitech-hidpp.c