diff options
-rw-r--r-- | drivers/hid/wacom_sys.c | 6 | ||||
-rw-r--r-- | drivers/hid/wacom_wac.c | 8 | ||||
-rw-r--r-- | drivers/hid/wacom_wac.h | 8 |
3 files changed, 10 insertions, 12 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 |
diff --git a/drivers/hid/wacom_wac.c b/drivers/hid/wacom_wac.c index ac7447c7b82e..596a6fb5b8b5 100644 --- a/drivers/hid/wacom_wac.c +++ b/drivers/hid/wacom_wac.c | |||
@@ -15,7 +15,6 @@ | |||
15 | #include "wacom_wac.h" | 15 | #include "wacom_wac.h" |
16 | #include "wacom.h" | 16 | #include "wacom.h" |
17 | #include <linux/input/mt.h> | 17 | #include <linux/input/mt.h> |
18 | #include <linux/hid.h> | ||
19 | 18 | ||
20 | /* resolution for penabled devices */ | 19 | /* resolution for penabled devices */ |
21 | #define WACOM_PL_RES 20 | 20 | #define WACOM_PL_RES 20 |
@@ -1514,13 +1513,6 @@ static void wacom_wac_finger_report(struct hid_device *hdev, | |||
1514 | wacom_wac->shared->touch_down = wacom_wac_finger_count_touches(hdev); | 1513 | wacom_wac->shared->touch_down = wacom_wac_finger_count_touches(hdev); |
1515 | } | 1514 | } |
1516 | 1515 | ||
1517 | #define WACOM_PEN_FIELD(f) (((f)->logical == HID_DG_STYLUS) || \ | ||
1518 | ((f)->physical == HID_DG_STYLUS) || \ | ||
1519 | ((f)->application == HID_DG_PEN)) | ||
1520 | #define WACOM_FINGER_FIELD(f) (((f)->logical == HID_DG_FINGER) || \ | ||
1521 | ((f)->physical == HID_DG_FINGER) || \ | ||
1522 | ((f)->application == HID_DG_TOUCHSCREEN)) | ||
1523 | |||
1524 | void wacom_wac_usage_mapping(struct hid_device *hdev, | 1516 | void wacom_wac_usage_mapping(struct hid_device *hdev, |
1525 | struct hid_field *field, struct hid_usage *usage) | 1517 | struct hid_field *field, struct hid_usage *usage) |
1526 | { | 1518 | { |
diff --git a/drivers/hid/wacom_wac.h b/drivers/hid/wacom_wac.h index bfad815cda8a..7436f2be433d 100644 --- a/drivers/hid/wacom_wac.h +++ b/drivers/hid/wacom_wac.h | |||
@@ -10,6 +10,7 @@ | |||
10 | #define WACOM_WAC_H | 10 | #define WACOM_WAC_H |
11 | 11 | ||
12 | #include <linux/types.h> | 12 | #include <linux/types.h> |
13 | #include <linux/hid.h> | ||
13 | 14 | ||
14 | /* maximum packet length for USB devices */ | 15 | /* maximum packet length for USB devices */ |
15 | #define WACOM_PKGLEN_MAX 68 | 16 | #define WACOM_PKGLEN_MAX 68 |
@@ -71,6 +72,13 @@ | |||
71 | #define WACOM_QUIRK_MONITOR 0x0008 | 72 | #define WACOM_QUIRK_MONITOR 0x0008 |
72 | #define WACOM_QUIRK_BATTERY 0x0010 | 73 | #define WACOM_QUIRK_BATTERY 0x0010 |
73 | 74 | ||
75 | #define WACOM_PEN_FIELD(f) (((f)->logical == HID_DG_STYLUS) || \ | ||
76 | ((f)->physical == HID_DG_STYLUS) || \ | ||
77 | ((f)->application == HID_DG_PEN)) | ||
78 | #define WACOM_FINGER_FIELD(f) (((f)->logical == HID_DG_FINGER) || \ | ||
79 | ((f)->physical == HID_DG_FINGER) || \ | ||
80 | ((f)->application == HID_DG_TOUCHSCREEN)) | ||
81 | |||
74 | enum { | 82 | enum { |
75 | PENPARTNER = 0, | 83 | PENPARTNER = 0, |
76 | GRAPHIRE, | 84 | GRAPHIRE, |