summaryrefslogtreecommitdiff
path: root/drivers/hid/hid-asus.c
diff options
context:
space:
mode:
authorHans de Goede <hdegoede@redhat.com>2019-10-24 13:59:09 +0200
committerJiri Kosina <jkosina@suse.cz>2019-12-13 10:26:18 +0100
commitc07a0254c89e4bb69ca781cd488baa5b628e2754 (patch)
treecc66981361c6f2874691c619ba31440710a5feba /drivers/hid/hid-asus.c
parent8f18eca9ebc57d6b150237033f6439242907e0ba (diff)
HID: asus: Ignore Asus vendor-page usage-code 0xff events
At least on a T100HA an Asus vendor-page usage-code 0xff event is send on every suspend and again on resume, resulting in the following warning: asus 0003:0B05:1807.0002: Unmapped Asus vendor usagepage code 0xff being logged twice on every suspend/resume. This commit silences the "Unmapped Asus vendor usagepage code ..." warning for usage-code 0xff to avoid these warnings being logged. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Diffstat (limited to 'drivers/hid/hid-asus.c')
-rw-r--r--drivers/hid/hid-asus.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/hid/hid-asus.c b/drivers/hid/hid-asus.c
index 8063b1d567b1..e6e4c841fb06 100644
--- a/drivers/hid/hid-asus.c
+++ b/drivers/hid/hid-asus.c
@@ -261,7 +261,8 @@ 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 &&
- (usage->hid & HID_USAGE) != 0x00 && !usage->type) {
+ (usage->hid & HID_USAGE) != 0x00 &&
+ (usage->hid & HID_USAGE) != 0xff && !usage->type) {
hid_warn(hdev, "Unmapped Asus vendor usagepage code 0x%02x\n",
usage->hid & HID_USAGE);
}