summaryrefslogtreecommitdiff
path: root/drivers/hid/wacom_sys.c
diff options
context:
space:
mode:
authorPing Cheng <pingc@wacom.com>2018-06-25 13:24:36 -0700
committerJiri Kosina <jkosina@suse.cz>2018-07-03 12:07:52 +0200
commit418b573b431310306db31e445594317ba62f5508 (patch)
tree0a42fff571f08fb0f2889a794e28959a3ed4bfba /drivers/hid/wacom_sys.c
parent578325120ec122db98b3d57e833d16c1bdac6ec6 (diff)
HID: wacom: convert Wacom custom usages to standard HID usages
Otherwise the switch would not catch the proper usages. Signed-off-by: Ping Cheng <ping.cheng@wacom.com> Reviewed-by: Ping Cheng <ping.cheng@wacom.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Diffstat (limited to 'drivers/hid/wacom_sys.c')
-rw-r--r--drivers/hid/wacom_sys.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/hid/wacom_sys.c b/drivers/hid/wacom_sys.c
index 3a4cf2666a7c..52e85d21e40f 100644
--- a/drivers/hid/wacom_sys.c
+++ b/drivers/hid/wacom_sys.c
@@ -394,6 +394,7 @@ static void wacom_usage_mapping(struct hid_device *hdev,
struct wacom_features *features = &wacom->wacom_wac.features;
bool finger = WACOM_FINGER_FIELD(field);
bool pen = WACOM_PEN_FIELD(field);
+ unsigned equivalent_usage = wacom_equivalent_usage(usage->hid);
/*
* Requiring Stylus Usage will ignore boot mouse
@@ -409,7 +410,7 @@ static void wacom_usage_mapping(struct hid_device *hdev,
wacom_hid_usage_quirk(hdev, field, usage);
- switch (usage->hid) {
+ switch (equivalent_usage) {
case HID_GD_X:
features->x_max = field->logical_maximum;
if (finger) {