Skip to content

Commit eb13453

Browse files
nabijaczleweliJiri Kosina
authored andcommitted
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 <[email protected]> Signed-off-by: Jiri Kosina <[email protected]>
1 parent f2145f8 commit eb13453

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

drivers/hid/hid-input.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1313,12 +1313,12 @@ void hidinput_hid_event(struct hid_device *hid, struct hid_field *field, struct
13131313
return;
13141314
}
13151315

1316-
if (usage->hid == (HID_UP_DIGITIZER | 0x003c)) { /* Invert */
1316+
if (usage->hid == HID_DG_INVERT) {
13171317
*quirks = value ? (*quirks | HID_QUIRK_INVERT) : (*quirks & ~HID_QUIRK_INVERT);
13181318
return;
13191319
}
13201320

1321-
if (usage->hid == (HID_UP_DIGITIZER | 0x0032)) { /* InRange */
1321+
if (usage->hid == HID_DG_INRANGE) {
13221322
if (value) {
13231323
input_event(input, usage->type, (*quirks & HID_QUIRK_INVERT) ? BTN_TOOL_RUBBER : usage->code, 1);
13241324
return;
@@ -1328,7 +1328,7 @@ void hidinput_hid_event(struct hid_device *hid, struct hid_field *field, struct
13281328
return;
13291329
}
13301330

1331-
if (usage->hid == (HID_UP_DIGITIZER | 0x0030) && (*quirks & HID_QUIRK_NOTOUCH)) { /* Pressure */
1331+
if (usage->hid == HID_DG_TIPPRESSURE && (*quirks & HID_QUIRK_NOTOUCH)) {
13321332
int a = field->logical_minimum;
13331333
int b = field->logical_maximum;
13341334
input_event(input, EV_KEY, BTN_TOUCH, value > a + ((b - a) >> 3));

0 commit comments

Comments
 (0)