Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp6349573imu; Mon, 21 Jan 2019 07:25:23 -0800 (PST) X-Google-Smtp-Source: ALg8bN6oJTZznS3ayABqcaGhVl73ocVzCsgrkYGGyg/DBXp6hnaTHq1q6Hi7kjuagzAbPLD+nUj8 X-Received: by 2002:a62:5658:: with SMTP id k85mr29876892pfb.231.1548084323043; Mon, 21 Jan 2019 07:25:23 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1548084322; cv=none; d=google.com; s=arc-20160816; b=ZwUgpqUZo+5qj2Tlx4uvBf8HyQSY4Ohc9eEI5PhoPhti4jq2B3+NKDlFMluPIvmvTq YzpBFDoOdelA69Ao3YWGr4ceQySh036eqkx4F9cPEsR+eU5/eDKbchROheiQDbxECioa xYIwfDdesE9dTWTG2ry4CZ9jQ6sSDIQaygBuEWxZ3FFblEvsiyJdk0odfWZj7EQ41WXl JF7RQEZQmi8DXTf3qtmWBF4YXEnbjiIcYMEvlCg5b3b9QvhThPUbblpNMIwtMYQa91dY 0o+sVneE8Ek7lQJInm7+Q9BqP7j9fi2+o66AOOALlMVYOdEQHtdDVfhi63/zdWOQW1/A 8IBQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=XDGE+qU1zF2Z8o1jhT7Db8tnWq+WqpzKVtxprXRMkqk=; b=eKC5zoLUAwdYJVUf6tTahv89Yh5n3jQwXSlc1zCfgRAiJ1hbywa1T7ofAaqhN30Zy5 xdggesCpLNdpfC53eKTdrS7knZ6s9AfP3FaDhb1GwJtQejvuQ6sFqEy5kng9LTIJam/J 46pjBBo5YuTaDZp1dcES3s7C8L/sHqQ5wpJLOC/KtRhSJaGxaNngac6ipZ3Bo4gKnvcH VIEyZsxrALKJU5YfQDoerS3Ob0khli9NPr9nvupbblqg8rCzQG0E5ttxnHDuEoCC4lWc FpJSDRv8CwidBsN9h4hmdxvUJmMmtVz7dCdFtyIZ7gG489nV8O9oS3AfRmSuJEIW2a8n I6Iw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id v75si12365883pfd.157.2019.01.21.07.25.07; Mon, 21 Jan 2019 07:25:22 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728942AbfAUNYj (ORCPT + 99 others); Mon, 21 Jan 2019 08:24:39 -0500 Received: from mx1.redhat.com ([209.132.183.28]:53556 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728690AbfAUNYj (ORCPT ); Mon, 21 Jan 2019 08:24:39 -0500 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id EB29681F0D; Mon, 21 Jan 2019 13:24:38 +0000 (UTC) Received: from shalem.localdomain.com (unknown [10.36.118.22]) by smtp.corp.redhat.com (Postfix) with ESMTP id 7B40360CBA; Mon, 21 Jan 2019 13:24:37 +0000 (UTC) From: Hans de Goede To: Darren Hart , Andy Shevchenko , Corentin Chary Cc: Hans de Goede , acpi4asus-user@lists.sourceforge.net, platform-driver-x86@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] platform/x86: asus-wmi: Allow loading on systems without the Asus Management GUID Date: Mon, 21 Jan 2019 14:24:36 +0100 Message-Id: <20190121132436.31825-1-hdegoede@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.27]); Mon, 21 Jan 2019 13:24:39 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org hid-asus depends on asus-wmi through the asus_wmi_evaluate_method. Before this commit asus-wmi and thus hid-asus could not be loaded on non Asus systems. This breaks using Asus bluetooth keyboards such as the Asus T100CHI keyboard with non Asus systems. This commit fixes this by allowing asus-wmi to load on systems without the Asus Management GUID. This is save to do since all asus-wmi sub drivers use asus_wmi_register_driver which also checks for the GUID. This commit also improves the error messages in asus_wmi_register_driver to include "ASUS" in their description tom make them more clear. This is important since we now rely on those errors when loaded on systems without the Asus Management GUID. Signed-off-by: Hans de Goede --- drivers/platform/x86/asus-wmi.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/drivers/platform/x86/asus-wmi.c b/drivers/platform/x86/asus-wmi.c index 37b5de541270..ee1fa93708ec 100644 --- a/drivers/platform/x86/asus-wmi.c +++ b/drivers/platform/x86/asus-wmi.c @@ -2265,12 +2265,12 @@ static int asus_wmi_probe(struct platform_device *pdev) int ret; if (!wmi_has_guid(ASUS_WMI_MGMT_GUID)) { - pr_warn("Management GUID not found\n"); + pr_warn("ASUS Management GUID not found\n"); return -ENODEV; } if (wdrv->event_guid && !wmi_has_guid(wdrv->event_guid)) { - pr_warn("Event GUID not found\n"); + pr_warn("ASUS Event GUID not found\n"); return -ENODEV; } @@ -2320,11 +2320,6 @@ EXPORT_SYMBOL_GPL(asus_wmi_unregister_driver); static int __init asus_wmi_init(void) { - if (!wmi_has_guid(ASUS_WMI_MGMT_GUID)) { - pr_info("Asus Management GUID not found\n"); - return -ENODEV; - } - pr_info("ASUS WMI generic driver loaded\n"); return 0; } -- 2.20.1