Skip to content

Commit

Permalink
HID: input: Fix TransducerSerialNumber implementation
Browse files Browse the repository at this point in the history
The commit which introduced TransducerSerialNumber (368c966) is missing
two crucial implementation details. Firstly, the commit does not set the
type/code/bit/max fields as expected later down the code which can cause
the driver to crash when a tablet with this usage is connected. Secondly,
the call to 'set_bit' causes MSC_PULSELED to be sent instead of the
expected MSC_SERIAL. This commit addreses both issues.

Signed-off-by: Jason Gerecke <jason.gerecke@wacom.com>
Reviewed-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
Reviewed-by: Ping Cheng <pingc@wacom.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
  • Loading branch information
Jason Gerecke authored and Jiri Kosina committed Oct 29, 2014
1 parent f974008 commit 5989a55
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion drivers/hid/hid-input.c
Original file line number Diff line number Diff line change
Expand Up @@ -695,7 +695,10 @@ static void hidinput_configure_usage(struct hid_input *hidinput, struct hid_fiel
break;

case 0x5b: /* TransducerSerialNumber */
set_bit(MSC_SERIAL, input->mscbit);
usage->type = EV_MSC;
usage->code = MSC_SERIAL;
bit = input->mscbit;
max = MSC_MAX;
break;

default: goto unknown;
Expand Down

0 comments on commit 5989a55

Please sign in to comment.