From patchwork Sat Aug 12 07:44:17 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Pali_Roh=C3=A1r?= X-Patchwork-Id: 9896927 X-Patchwork-Delegate: andy.shevchenko@gmail.com Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 11BAD60236 for ; Sat, 12 Aug 2017 07:46:23 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 05E4B28B40 for ; Sat, 12 Aug 2017 07:46:23 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id EED8728BB9; Sat, 12 Aug 2017 07:46:22 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.5 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RCVD_IN_SORBS_SPAM autolearn=unavailable version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B706D28B40 for ; Sat, 12 Aug 2017 07:46:22 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752114AbdHLHp4 (ORCPT ); Sat, 12 Aug 2017 03:45:56 -0400 Received: from mail-wm0-f65.google.com ([74.125.82.65]:34733 "EHLO mail-wm0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750771AbdHLHpy (ORCPT ); Sat, 12 Aug 2017 03:45:54 -0400 Received: by mail-wm0-f65.google.com with SMTP id x64so8710555wmg.1; Sat, 12 Aug 2017 00:45:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=OO47sM+ykD7vXyIEx0vYkgAOrdyfRFTg1a3BgD591Go=; b=qWSai61mMidYQbwDKAotQTW6pMpIW4UI43tYBts4PzfV25VkD2lU8vXUOwhZX7bmqC xln2okW90FCSclq6T/wOUcQ+ZbIUfbUTAfVOZU4ThRUq2qk4CcsrUUGhHizoi5Z6rOln jCRrwnUIApBvAflGY2j3rBZcW94EN/o1njJQZk1GuO600cVt6q1hhovrN7uF8iII70ao WutKF1vokrIUZ3Q4VsaZfEfEek2ZUY2wwP8Pjbh0jWqei4e3cHuMp7EK9YdQWz1PiA0t h1EskFP9LT3FqD9iayamCeU9QbXpgGHZlJRnsOJXy32yV6zuPEntGtCjDIufMYN78/Is izhg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=OO47sM+ykD7vXyIEx0vYkgAOrdyfRFTg1a3BgD591Go=; b=VExs+ArDWMn7UnwAPMxi8iJwQ742sEqrgC6Kkc6RI9b1idckpMPR5hWM/1a1FMHScN IVWeuvCH0JWGtluISIcJMrfb9UEaBpLC52z2FLhN9FBkYg/ackYn/cPrnpfSp8JHEWqU /tIfbYxMlxGhapwA9IOEFD/Psb4HBcDxzN4hO57BFKNBKf0B/sZIAJcem3YLuHAlypD2 d4fQzepM/zQUDmrfU63jMNyLLCCnQHSg2sB6dNy9L4HXEHcfmamlnoo27Zj5I1c4r9B6 c2YKAxDEkphTUOIwIkfII3xm2NALX0TzH4Y17Uil2yNSigmygPPZWEBZP6bCc959utq0 qW0g== X-Gm-Message-State: AHYfb5jJaOV1vaypOxIvrUoS8KVOr3o39dJU9gTJfpW2HXrL/AwshJoT XRRuZdZrIiU95Q== X-Received: by 10.28.73.193 with SMTP id w184mr842877wma.178.1502523953633; Sat, 12 Aug 2017 00:45:53 -0700 (PDT) Received: from Pali-Latitude.lan (pali.kolej.mff.cuni.cz. [78.128.193.202]) by smtp.gmail.com with ESMTPSA id d200sm651526wmd.32.2017.08.12.00.45.52 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 12 Aug 2017 00:45:53 -0700 (PDT) From: =?UTF-8?q?Pali=20Roh=C3=A1r?= To: Corentin Chary , Darren Hart , Andy Shevchenko Cc: acpi4asus-user@lists.sourceforge.net, platform-driver-x86@vger.kernel.org, linux-kernel@vger.kernel.org, =?UTF-8?q?Pali=20Roh=C3=A1r?= , Hans de Goede Subject: [PATCH 3/4] platform/x86: peaq-wmi: Evaluate wmi method with instance number 0x0 Date: Sat, 12 Aug 2017 09:44:17 +0200 Message-Id: <1502523858-25716-4-git-send-email-pali.rohar@gmail.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1502523858-25716-1-git-send-email-pali.rohar@gmail.com> References: <1502523858-25716-1-git-send-email-pali.rohar@gmail.com> MIME-Version: 1.0 Sender: platform-driver-x86-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: platform-driver-x86@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP According to Hans de Goede, WMI interface of thh peaq-wmi module has 10 instances but corresponding ACPI WMBC method does not check Arg0 (instance number) at all. Therefore evaluate WMI method with first instance number (0x0) instead of second (0x1). Signed-off-by: Pali Rohár Cc: Hans de Goede Acked-by: Hans de Goede --- drivers/platform/x86/peaq-wmi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/platform/x86/peaq-wmi.c b/drivers/platform/x86/peaq-wmi.c index 77d1f90..f59a5a2 100644 --- a/drivers/platform/x86/peaq-wmi.c +++ b/drivers/platform/x86/peaq-wmi.c @@ -39,7 +39,7 @@ static void peaq_wmi_poll(struct input_polled_dev *dev) struct acpi_buffer input = { sizeof(dummy), &dummy }; struct acpi_buffer output = { sizeof(obj), &obj }; - status = wmi_evaluate_method(PEAQ_DOLBY_BUTTON_GUID, 1, + status = wmi_evaluate_method(PEAQ_DOLBY_BUTTON_GUID, 0, PEAQ_DOLBY_BUTTON_METHOD_ID, &input, &output); if (ACPI_FAILURE(status))