mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 19:21:31 -04:00
HID: input: Fix TransducerSerialNumber implementation
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 <[email protected]>
Reviewed-by: Benjamin Tissoires <[email protected]>
Reviewed-by: Ping Cheng <[email protected]>
Signed-off-by: Jiri Kosina <[email protected]>
This commit is contained in:
parent
f974008f07
commit
5989a55a4c
1 changed files with 4 additions and 1 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Reference in a new issue