From patchwork Wed Sep 9 17:25:45 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Azael Avalos X-Patchwork-Id: 7147751 Return-Path: X-Original-To: patchwork-platform-driver-x86@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id D65549F326 for ; Wed, 9 Sep 2015 17:25:57 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id F232E2098E for ; Wed, 9 Sep 2015 17:25:56 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 1CCAF20994 for ; Wed, 9 Sep 2015 17:25:56 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753371AbbIIRZy (ORCPT ); Wed, 9 Sep 2015 13:25:54 -0400 Received: from mail-ob0-f175.google.com ([209.85.214.175]:35798 "EHLO mail-ob0-f175.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754495AbbIIRZw (ORCPT ); Wed, 9 Sep 2015 13:25:52 -0400 Received: by obuk4 with SMTP id k4so13790555obu.2; Wed, 09 Sep 2015 10:25:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=O6/isazP5YsD2Ugaj6JOxClsOdSaF35rrVZnP21cZlM=; b=Xsxn4XIm38F8IXsZevnCNU/GVe1WQLoUcJsPE0xDmOvZwOuWtuu1fljcFyfP0EmVP1 /0x5fNwEEPy3wS2n12xxN8yftA/H+nC7C/bb9UfGGpoKQXwOndhvGep2oVx8uemM1HN6 s32+/88XUDaOqLBc4HVcig+IE8R6ChML4PgZGgssF30lA2fXnZmpZFLpKJV0OR2xwzYz 86eGmt2TudFz5FTaNLnISl/X4xy9T9Ve43H8KvyX/4vt6KMpbabYJ/tGVZ87cL+ghIfg kDaAjdPg3gHW9GwG6WT/hEyNwASAhQV2Xpru0NtDn8VDjp92KbVojx+nn8ceeBx/NXH0 i/sA== X-Received: by 10.60.132.45 with SMTP id or13mr28654242oeb.20.1441819551837; Wed, 09 Sep 2015 10:25:51 -0700 (PDT) Received: from Shakuras.scurra.org ([148.210.109.33]) by smtp.gmail.com with ESMTPSA id l5sm4412241oey.5.2015.09.09.10.25.50 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 09 Sep 2015 10:25:50 -0700 (PDT) From: Azael Avalos To: Darren Hart , platform-driver-x86@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Azael Avalos , Subject: [PATCH] toshiba_acpi: Fix hotkeys registration on some toshiba models Date: Wed, 9 Sep 2015 11:25:45 -0600 Message-Id: <1441819545-11619-2-git-send-email-coproscefalo@gmail.com> X-Mailer: git-send-email 2.5.1 In-Reply-To: <1441819545-11619-1-git-send-email-coproscefalo@gmail.com> References: <1441819545-11619-1-git-send-email-coproscefalo@gmail.com> Sender: platform-driver-x86-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: platform-driver-x86@vger.kernel.org X-Spam-Status: No, score=-6.8 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, T_DKIM_INVALID, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Commit a2b3471b5b13 ("toshiba_acpi: Use the Hotkey Event Type function for keymap choosing") changed the *setup_keyboard function to query for the Hotkey Event Type to help choose the correct keymap, but turns out that here are certain Toshiba models out there not implementing this feature, and thus, failing to continue the input device registration and leaving such laptops without hotkey support. This patch changes such check, and instead of returning an error if the Hotkey Event Type is not present, we simply inform userspace about it, changing the message printed from err to notice, making the function responsible for registering the input device to continue. This issue was found on a Toshiba Portege Z30-B, but there might be some other models out there affected by this regression as well. Cc: # 4.1+ Signed-off-by: Azael Avalos --- drivers/platform/x86/toshiba_acpi.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/drivers/platform/x86/toshiba_acpi.c b/drivers/platform/x86/toshiba_acpi.c index c434b53..f2372f4 100644 --- a/drivers/platform/x86/toshiba_acpi.c +++ b/drivers/platform/x86/toshiba_acpi.c @@ -2398,11 +2398,9 @@ static int toshiba_acpi_setup_keyboard(struct toshiba_acpi_dev *dev) if (error) return error; - error = toshiba_hotkey_event_type_get(dev, &events_type); - if (error) { - pr_err("Unable to query Hotkey Event Type\n"); - return error; - } + if (toshiba_hotkey_event_type_get(dev, &events_type)) + pr_notice("Unable to query Hotkey Event Type\n"); + dev->hotkey_event_type = events_type; dev->hotkey_dev = input_allocate_device();