From patchwork Fri Jul 27 09:40:17 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wen-chien Jesse Sung X-Patchwork-Id: 173610 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from chlorine.canonical.com (chlorine.canonical.com [91.189.94.204]) by ozlabs.org (Postfix) with ESMTP id 97CB22C0087 for ; Fri, 27 Jul 2012 19:40:41 +1000 (EST) Received: from localhost ([127.0.0.1] helo=chlorine.canonical.com) by chlorine.canonical.com with esmtp (Exim 4.71) (envelope-from ) id 1Suh22-0006nw-6J; Fri, 27 Jul 2012 09:40:26 +0000 Received: from youngberry.canonical.com ([91.189.89.112]) by chlorine.canonical.com with esmtp (Exim 4.71) (envelope-from ) id 1Suh21-0006nq-0V for kernel-team@lists.ubuntu.com; Fri, 27 Jul 2012 09:40:25 +0000 Received: from [112.104.135.129] (helo=localhost.localdomain) by youngberry.canonical.com with esmtpsa (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1Suh20-0007fL-Dc; Fri, 27 Jul 2012 09:40:24 +0000 From: Jesse Sung To: kernel-team@lists.ubuntu.com Subject: [Precise][PATCH] ideapad: generate valid key event only Date: Fri, 27 Jul 2012 17:40:17 +0800 Message-Id: <1343382017-10613-1-git-send-email-jesse.sung@canonical.com> X-Mailer: git-send-email 1.7.9.5 Cc: 1029834@bugs.launchpad.net X-BeenThere: kernel-team@lists.ubuntu.com X-Mailman-Version: 2.1.13 Precedence: list List-Id: Kernel team discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: kernel-team-bounces@lists.ubuntu.com Errors-To: kernel-team-bounces@lists.ubuntu.com From: Ike Panhc BugLink: https://bugs.launchpad.net/bugs/1029834 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 (cherry picked from commit 20a769c1c6671d3b8d18a7358eff15e3dd29e94b) Signed-off-by: Wen-chien Jesse Sung --- drivers/platform/x86/ideapad-laptop.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/drivers/platform/x86/ideapad-laptop.c b/drivers/platform/x86/ideapad-laptop.c index a36addf..a1d1415 100644 --- a/drivers/platform/x86/ideapad-laptop.c +++ b/drivers/platform/x86/ideapad-laptop.c @@ -785,6 +785,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; @@ -795,7 +799,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); } } }