]> git.baikalelectronics.ru Git - kernel.git/commit
HID: core: fix computation of the report size
authorBenjamin Tissoires <benjamin.tissoires@redhat.com>
Wed, 30 Apr 2014 21:48:40 +0000 (17:48 -0400)
committerJiri Kosina <jkosina@suse.cz>
Mon, 5 May 2014 13:54:40 +0000 (15:54 +0200)
commit1446a51c8346f90bf02045b2fab5595f6335bab8
tree09ff821bfc4f821fd900a01da3b8e5eb6147d3a2
parentab2003f3f5de887ef55a8c5b5c745c5dae49c6ce
HID: core: fix computation of the report size

The extra seven bits are only required when allocating the report buffer.
We can not use those extra bytes for the length of the report in the
generic implementation of .request because the device might (will) refuse
the set_report command.
This has been verified on the Atmel touchpad found on the Samsung Ativ 9
plus, which uses hid-multitouch and HID over I2C. Without this fix, the
device refuses to switch to the multitouch mode, and it becomes unresponsive
from the user point of view.

Actually, this has been discussed during the initial submission of the
commit 67e435c0c8e2b4dc23925b6b89f010a6aefbead8, see
https://patchwork.kernel.org/patch/3621751/

Unfortunately, I completely forgot about it later.

Reported-by: Matthias Bayer <thematthiasbayer@gmail.com>
Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
drivers/hid/hid-core.c