diff options
author | Jason Gerecke <killertofu@gmail.com> | 2014-09-23 22:09:28 +0400 |
---|---|---|
committer | Jiri Kosina <jkosina@suse.cz> | 2014-10-29 12:59:06 +0300 |
commit | 5989a55a4c9aafba8b152c6bf52244510c2b88b9 (patch) | |
tree | fff5a63737ebe850d74b4febb05fc0ae91eb50d5 /drivers/hid | |
parent | f974008f07a62171a9dede08250c9a35c2b2b986 (diff) | |
download | linux-5989a55a4c9aafba8b152c6bf52244510c2b88b9.tar.xz |
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 <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>
Diffstat (limited to 'drivers/hid')
-rw-r--r-- | drivers/hid/hid-input.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/hid/hid-input.c b/drivers/hid/hid-input.c index 56c6c30f2c7d..725f22ca47fc 100644 --- a/drivers/hid/hid-input.c +++ b/drivers/hid/hid-input.c @@ -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; |