diff options
author | Jason Gerecke <killertofu@gmail.com> | 2019-01-24 22:09:44 +0300 |
---|---|---|
committer | Benjamin Tissoires <benjamin.tissoires@redhat.com> | 2019-01-29 13:14:57 +0300 |
commit | e9fe0d4921ee07d934d839d8e418f83dded48aa7 (patch) | |
tree | d18009d8d325391dab8c4e00a50d3590c98343ef /drivers/hid/wacom_wac.c | |
parent | 787a3b4322763284a594a5dd3680508c0bfb20b0 (diff) | |
download | linux-e9fe0d4921ee07d934d839d8e418f83dded48aa7.tar.xz |
HID: wacom: Move HID fix for AES serial number into wacom_hid_usage_quirk
The 'wacom_hid_usage_quirk' function is the intended home for fixing
up descriptors that are buggy or that don't quite fit the mold. Commit
578325120e was supposed to move all of these quirks but it missed the
code to handle fixup the serial number usages for AES pens. Lets move
this code out of 'wacom_wac_pen_usage_mapping' where it was previously
lurking and put it into the same place as the others.
Signed-off-by: Jason Gerecke <jason.gerecke@wacom.com>
Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
Diffstat (limited to 'drivers/hid/wacom_wac.c')
-rw-r--r-- | drivers/hid/wacom_wac.c | 21 |
1 files changed, 0 insertions, 21 deletions
diff --git a/drivers/hid/wacom_wac.c b/drivers/hid/wacom_wac.c index 5dd3a8245f0f..72477e872324 100644 --- a/drivers/hid/wacom_wac.c +++ b/drivers/hid/wacom_wac.c @@ -2159,27 +2159,6 @@ static void wacom_wac_pen_usage_mapping(struct hid_device *hdev, case HID_DG_TOOLSERIALNUMBER: features->quirks |= WACOM_QUIRK_TOOLSERIAL; wacom_map_usage(input, usage, field, EV_MSC, MSC_SERIAL, 0); - - /* Adjust AES usages to match modern convention */ - if (usage->hid == WACOM_HID_WT_SERIALNUMBER && field->report_size == 16) { - if (field->index + 2 < field->report->maxfield) { - struct hid_field *a = field->report->field[field->index + 1]; - struct hid_field *b = field->report->field[field->index + 2]; - - if (a->maxusage > 0 && a->usage[0].hid == HID_DG_TOOLSERIALNUMBER && a->report_size == 32 && - b->maxusage > 0 && b->usage[0].hid == 0xFF000000 && b->report_size == 8) { - features->quirks |= WACOM_QUIRK_AESPEN; - usage->hid = WACOM_HID_WD_TOOLTYPE; - field->logical_minimum = S16_MIN; - field->logical_maximum = S16_MAX; - a->logical_minimum = S32_MIN; - a->logical_maximum = S32_MAX; - b->usage[0].hid = WACOM_HID_WD_SERIALHI; - b->logical_minimum = 0; - b->logical_maximum = U8_MAX; - } - } - } break; case WACOM_HID_WD_SENSE: features->quirks |= WACOM_QUIRK_SENSE; |