From: Ike Panhc Date: Thu, 3 May 2012 09:38:46 +0000 (+0800) Subject: ideapad: generate valid key event only X-Git-Tag: firefly_0821_release~3680^2~2687^2~23 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=20a769c1c6671d3b8d18a7358eff15e3dd29e94b;p=firefly-linux-kernel-4.4.55.git ideapad: generate valid key event only Otherwise will generate KEY_UNKNOWN on un-listed vpc event, which means nothing and is hard for user to report the detail of the event. Signed-off-by: Ike Panhc Signed-off-by: Matthew Garrett --- diff --git a/drivers/platform/x86/ideapad-laptop.c b/drivers/platform/x86/ideapad-laptop.c index 00d82f168c58..4f20f8dd3d7c 100644 --- a/drivers/platform/x86/ideapad-laptop.c +++ b/drivers/platform/x86/ideapad-laptop.c @@ -784,6 +784,10 @@ static void ideapad_acpi_notify(struct acpi_device *adevice, u32 event) case 9: ideapad_sync_rfk_state(priv); break; + case 13: + case 6: + ideapad_input_report(priv, vpc_bit); + break; case 4: ideapad_backlight_notify_brightness(priv); break; @@ -794,7 +798,7 @@ static void ideapad_acpi_notify(struct acpi_device *adevice, u32 event) ideapad_backlight_notify_power(priv); break; default: - ideapad_input_report(priv, vpc_bit); + pr_info("Unknown event: %lu\n", vpc_bit); } } }