summaryrefslogtreecommitdiffstats
path: root/drivers/hid/hid-input.c
diff options
context:
space:
mode:
authorAhelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>2021-03-08 18:42:13 +0100
committerJiri Kosina <jkosina@suse.cz>2021-05-05 15:07:35 +0200
commiteb134536cf6fb2e50b5ced653f7c34d306b2d73f (patch)
tree7db11b861c3561d3c14457cc0eb0561edd531b0c /drivers/hid/hid-input.c
parentHID: do not use down_interruptible() when unbinding devices (diff)
downloadlinux-eb134536cf6fb2e50b5ced653f7c34d306b2d73f.tar.xz
linux-eb134536cf6fb2e50b5ced653f7c34d306b2d73f.zip
HID: input: replace outdated HID numbers+comments with macros
These were untouched since 2.3.99-pre3, and the explanatory comment for HID_DG_TIPPRESSURE is TipPressure in other places Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Diffstat (limited to 'drivers/hid/hid-input.c')
-rw-r--r--drivers/hid/hid-input.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/hid/hid-input.c b/drivers/hid/hid-input.c
index 18f5e28d475c..c62c6a9b2132 100644
--- a/drivers/hid/hid-input.c
+++ b/drivers/hid/hid-input.c
@@ -1313,12 +1313,12 @@ void hidinput_hid_event(struct hid_device *hid, struct hid_field *field, struct
return;
}
- if (usage->hid == (HID_UP_DIGITIZER | 0x003c)) { /* Invert */
+ if (usage->hid == HID_DG_INVERT) {
*quirks = value ? (*quirks | HID_QUIRK_INVERT) : (*quirks & ~HID_QUIRK_INVERT);
return;
}
- if (usage->hid == (HID_UP_DIGITIZER | 0x0032)) { /* InRange */
+ if (usage->hid == HID_DG_INRANGE) {
if (value) {
input_event(input, usage->type, (*quirks & HID_QUIRK_INVERT) ? BTN_TOOL_RUBBER : usage->code, 1);
return;
@@ -1328,7 +1328,7 @@ void hidinput_hid_event(struct hid_device *hid, struct hid_field *field, struct
return;
}
- if (usage->hid == (HID_UP_DIGITIZER | 0x0030) && (*quirks & HID_QUIRK_NOTOUCH)) { /* Pressure */
+ if (usage->hid == HID_DG_TIPPRESSURE && (*quirks & HID_QUIRK_NOTOUCH)) {
int a = field->logical_minimum;
int b = field->logical_maximum;
input_event(input, EV_KEY, BTN_TOUCH, value > a + ((b - a) >> 3));