diff options
author | Benjamin Tissoires <benjamin.tissoires@redhat.com> | 2015-01-05 16:32:12 -0500 |
---|---|---|
committer | Jiri Kosina <jkosina@suse.cz> | 2015-01-06 04:08:44 -0500 |
commit | d97a552210320d3bec8ee22b8ccdb1d6d189482a (patch) | |
tree | 8ceb48b81a56875c769dd276194f6c3c6c4fee1e /drivers/hid/wacom_sys.c | |
parent | 0349678ccd74d16c1f2bb58ecafec13ef7110e36 (diff) |
HID: wacom: use WACOM_*_FIELD macros in wacom_usage_mapping()
We introduced nice macros in wacom_wac.c to check whether a field is
a pen or a touch one.
wacom_usage_mapping() still uses it's own tests, which are not in sync with
the wacom_wac tests (.application is not checked).
That means that some legitimate fields might be filtered out from the
usage mapping, and thus will not be used properly while receiving the
events.
Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Diffstat (limited to 'drivers/hid/wacom_sys.c')
-rw-r--r-- | drivers/hid/wacom_sys.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/hid/wacom_sys.c b/drivers/hid/wacom_sys.c index 654202941d30..f01ab3a0c5f5 100644 --- a/drivers/hid/wacom_sys.c +++ b/drivers/hid/wacom_sys.c | |||
@@ -173,10 +173,8 @@ static void wacom_usage_mapping(struct hid_device *hdev, | |||
173 | { | 173 | { |
174 | struct wacom *wacom = hid_get_drvdata(hdev); | 174 | struct wacom *wacom = hid_get_drvdata(hdev); |
175 | struct wacom_features *features = &wacom->wacom_wac.features; | 175 | struct wacom_features *features = &wacom->wacom_wac.features; |
176 | bool finger = (field->logical == HID_DG_FINGER) || | 176 | bool finger = WACOM_FINGER_FIELD(field); |
177 | (field->physical == HID_DG_FINGER); | 177 | bool pen = WACOM_PEN_FIELD(field); |
178 | bool pen = (field->logical == HID_DG_STYLUS) || | ||
179 | (field->physical == HID_DG_STYLUS); | ||
180 | 178 | ||
181 | /* | 179 | /* |
182 | * Requiring Stylus Usage will ignore boot mouse | 180 | * Requiring Stylus Usage will ignore boot mouse |