mirror of
https://github.com/torvalds/linux.git
synced 2026-06-03 03:53:37 +02:00
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>
This commit is contained in:
parent
fde4ce068d
commit
06501b557f
|
|
@ -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",
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user