From 06501b557faec7c4aa1a3188e14c8c3d1e6e15de Mon Sep 17 00:00:00 2001 From: Ionut Nechita Date: Wed, 7 Jan 2026 17:42:18 +0200 Subject: [PATCH] HID: asus: Replace magic number with HID_UP_ASUSVENDOR constant Use the existing HID_UP_ASUSVENDOR constant instead of the magic number 0xff310000 for better code clarity and maintainability. Reviewed-by: Denis Benato Reviewed-by: Mario Limonciello (AMD) Signed-off-by: Ionut Nechita Signed-off-by: Jiri Kosina --- drivers/hid/hid-asus.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/hid/hid-asus.c b/drivers/hid/hid-asus.c index a444d41e53b6c..9a969f5c5c90e 100644 --- a/drivers/hid/hid-asus.c +++ b/drivers/hid/hid-asus.c @@ -316,7 +316,7 @@ static int asus_e1239t_event(struct asus_drvdata *drvdat, u8 *data, int size) static int asus_event(struct hid_device *hdev, struct hid_field *field, struct hid_usage *usage, __s32 value) { - if ((usage->hid & HID_USAGE_PAGE) == 0xff310000 && + if ((usage->hid & HID_USAGE_PAGE) == HID_UP_ASUSVENDOR && (usage->hid & HID_USAGE) != 0x00 && (usage->hid & HID_USAGE) != 0xff && !usage->type) { hid_warn(hdev, "Unmapped Asus vendor usagepage code 0x%02x\n", -- 2.47.3