Skip to content

Commit 06501b5

Browse files
ionutnechitaJiri Kosina
authored andcommitted
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 <benato.denis96@gmail.com> Reviewed-by: Mario Limonciello (AMD) <superm1@kernel.org> Signed-off-by: Ionut Nechita <ionut_n2001@yahoo.com> Signed-off-by: Jiri Kosina <jkosina@suse.com>
1 parent fde4ce0 commit 06501b5

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

drivers/hid/hid-asus.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -316,7 +316,7 @@ static int asus_e1239t_event(struct asus_drvdata *drvdat, u8 *data, int size)
316316
static int asus_event(struct hid_device *hdev, struct hid_field *field,
317317
struct hid_usage *usage, __s32 value)
318318
{
319-
if ((usage->hid & HID_USAGE_PAGE) == 0xff310000 &&
319+
if ((usage->hid & HID_USAGE_PAGE) == HID_UP_ASUSVENDOR &&
320320
(usage->hid & HID_USAGE) != 0x00 &&
321321
(usage->hid & HID_USAGE) != 0xff && !usage->type) {
322322
hid_warn(hdev, "Unmapped Asus vendor usagepage code 0x%02x\n",

0 commit comments

Comments
 (0)