Skip to content

Commit

Permalink
HID: wacom: convert Wacom custom usages to standard HID usages
Browse files Browse the repository at this point in the history
Otherwise the switch would not catch the proper usages.

Signed-off-by: Ping Cheng <[email protected]>
Reviewed-by: Ping Cheng <[email protected]>
Signed-off-by: Jiri Kosina <[email protected]>
  • Loading branch information
Ping Cheng authored and Jiri Kosina committed Jul 3, 2018
1 parent 5783251 commit 418b573
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion drivers/hid/wacom_sys.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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) {
Expand Down

0 comments on commit 418b573

Please sign in to comment.