Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp9322178ybl; Fri, 17 Jan 2020 09:57:45 -0800 (PST) X-Google-Smtp-Source: APXvYqylomqSbxQtnhswqjssnsGoSLFHC7/j+hH+Zmvlo3FvqNt4AGSFeWakLrCLv9PYJ2DiCGiz X-Received: by 2002:aca:b1d5:: with SMTP id a204mr4210196oif.82.1579283865382; Fri, 17 Jan 2020 09:57:45 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1579283865; cv=none; d=google.com; s=arc-20160816; b=VAD8S8mU9WwHlPKvoWleM4PfZMODzTdzlJku5XdjL/KDrvJKcOjG2olAXb9+p/uohV zA1Y6rOLtPBVdbPxQiJabslHOvabTq/acTdEZVvaP7E+TzP0Vsfr+HKci8cveBSLYSiB kGvUXKyfpHUDIvxQcjZL0BjHUd5wNVqffWH4YWbMJYbh652QO7mLjDgfG+a4HTmj50Zl misjbjMbeq09o6bSCH7WcSziBvQCfag758rENUSY2fG1wWoBLgZgMjfa9v0n3q8CGvI4 KAyxt/tWrpW0N2uffCh8OH2rjPSARpO30c/23NYdUkIV/okFqcjEQy8VbJ6pxkCQ0hmu 1Ftw== 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 :references:in-reply-to:message-id:date:subject:cc:to:from; bh=+2xY3JXGUwLSfk2nbrDpXpPzqp8UJaLTKDo3pqd9NRU=; b=FM9ODQK+rh8x9fhe5vzHOh4tjJfLisbgvhyP9IuiK8Ffa634gf09YZkgTHWMVTNxUj TxllQxPbfxImqilnifFZz6ovJDSpQ5MXB2so5aTYajY2fQzDzBwvGR7CW+1mtEfqlGDq s5ER1vAdQBAv9K1E0cBG9OttCLVEeHd2D8vAd5wDv7MkucSQN0CJw7LS8KIMPud8Asmc vSeJuS2Ngnv1LjHRdCEP9JsAsYzm1F7UgrjtWy3cqqMwV6Uwl2cAN8JcO7npJHrxOq2z gO7GfJVtqoLler5EEgKV4hrmx260V4slyBnKIardrNKPPIpnaK26Bj9Zx+m+Q443GV/F QC6A== 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=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id l12si13738872oib.254.2020.01.17.09.57.33; Fri, 17 Jan 2020 09:57:45 -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=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729224AbgAQR4h (ORCPT + 99 others); Fri, 17 Jan 2020 12:56:37 -0500 Received: from mga11.intel.com ([192.55.52.93]:62787 "EHLO mga11.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729108AbgAQR4e (ORCPT ); Fri, 17 Jan 2020 12:56:34 -0500 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga007.jf.intel.com ([10.7.209.58]) by fmsmga102.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 17 Jan 2020 09:56:34 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.70,331,1574150400"; d="scan'208";a="214555786" Received: from black.fi.intel.com ([10.237.72.28]) by orsmga007.jf.intel.com with ESMTP; 17 Jan 2020 09:56:31 -0800 Received: by black.fi.intel.com (Postfix, from userid 1003) id 19853BD; Fri, 17 Jan 2020 19:56:27 +0200 (EET) From: Andy Shevchenko To: Thomas Gleixner , Ingo Molnar , Borislav Petkov , "H. Peter Anvin" , x86@kernel.org, Alessandro Zummo , Alexandre Belloni , linux-rtc@vger.kernel.org, "Guilherme G . Piccoli" , linux-kernel@vger.kernel.org Cc: Andy Shevchenko Subject: [PATCH v1 6/8] platform/x86: surface3_wmi: Switch DMI table match to a test of variable Date: Fri, 17 Jan 2020 19:56:24 +0200 Message-Id: <20200117175626.56358-6-andriy.shevchenko@linux.intel.com> X-Mailer: git-send-email 2.24.1 In-Reply-To: <20200117175626.56358-1-andriy.shevchenko@linux.intel.com> References: <20200117175626.56358-1-andriy.shevchenko@linux.intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Since we have a common x86 quirk that provides an exported variable, use it instead of local DMI table match. Signed-off-by: Andy Shevchenko --- drivers/platform/x86/surface3-wmi.c | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) diff --git a/drivers/platform/x86/surface3-wmi.c b/drivers/platform/x86/surface3-wmi.c index 130b6f52a600..5eeedc4ddb8a 100644 --- a/drivers/platform/x86/surface3-wmi.c +++ b/drivers/platform/x86/surface3-wmi.c @@ -11,9 +11,9 @@ #include #include -#include #include #include +#include #include #include @@ -29,18 +29,6 @@ MODULE_LICENSE("GPL"); MODULE_ALIAS("wmi:" SURFACE3_LID_GUID); -static const struct dmi_system_id surface3_dmi_table[] = { -#if defined(CONFIG_X86) - { - .matches = { - DMI_MATCH(DMI_SYS_VENDOR, "Microsoft Corporation"), - DMI_MATCH(DMI_PRODUCT_NAME, "Surface 3"), - }, - }, -#endif - { } -}; - struct surface3_wmi { struct acpi_device *touchscreen_adev; struct acpi_device *pnp0c0d_adev; @@ -201,7 +189,7 @@ static int __init s3_wmi_probe(struct platform_device *pdev) { int error; - if (!dmi_check_system(surface3_dmi_table)) + if (!x86_microsoft_surface_3_machine) return -ENODEV; memset(&s3_wmi, 0, sizeof(s3_wmi)); -- 2.24.1