]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
HID: uHID: fix excepted report type
authorBenjamin Tissoires <benjamin.tissoires@redhat.com>
Wed, 1 Oct 2014 15:59:47 +0000 (11:59 -0400)
committerJiri Kosina <jkosina@suse.cz>
Wed, 1 Oct 2014 18:58:46 +0000 (20:58 +0200)
commit8493ecca74a7b4a66e19676de1a0f14194179941
tree9c6af6d86f4cb17ea8d76f1c54a37c3a69c525bd
parent76c7c4916e96e55e637943bc03aaaf2e9b43ef73
HID: uHID: fix excepted report type

When uhid_get_report() or uhid_set_report() are called, they emit on the
char device a UHID_GET_REPORT or UHID_SET_REPORT message. Then, the
protocol says that the user space asnwers with UHID_GET_REPORT_REPLY
or UHID_SET_REPORT_REPLY.

Unfortunatelly, the current code waits for an event of type UHID_GET_REPORT
or UHID_SET_REPORT instead of the reply one.
Add 1 to UHID_GET_REPORT or UHID_SET_REPORT to actually wait for the
reply, and validate the reply.

Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
Reviewed-by: David Herrmann <dh.herrmann@gmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
drivers/hid/uhid.c