Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp9323762ybl; Fri, 17 Jan 2020 09:59:43 -0800 (PST) X-Google-Smtp-Source: APXvYqxNvcedgtx0d9G9asbmYIBYvPcSIbtgk6ef25BA5SROgMJhO2vAO6WKry8chD+W+9315H7t X-Received: by 2002:a9d:6f07:: with SMTP id n7mr6896142otq.112.1579283983509; Fri, 17 Jan 2020 09:59:43 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1579283983; cv=none; d=google.com; s=arc-20160816; b=fh0m3TaHLfsSzvR+CRCRLt83A4C3reo7Zt3VkfJ53PkBCv9Qsb6wWTfXiRVxUPXVf9 hbl0UWtsa0tUAWaowzwWJZqzK9wU9GcmkG0EtGyu97qxiV/xP2/D1t0asz/l5CXTgF3d pU97A0c0DBs5s0bSBr7gQk2n3x8DzQOktNvgXv98Sk6w0hgT4mdVKeIJtpLXIBlpI4k0 grOolgXbopwdKNYM2ZXsCwPx8Kw9BEb2uw1g/zzWw2QhdAvMh81OY7nEpnc45t+sn9ZO EyxF6uNi//DSEUGHSpSyCi4iwe40hrqtsjFHQmpQV+Ba/qCitUvhscAireMcgimiVWz8 voZA== 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=YCpwtkZnL/IRA4Qz3s1y0k7yp+eH32ChbhpNLbfFkTE=; b=XqBT/ItrxxvPzoGO+nizNwUgOfpNhDarTJzXa+aHokZ641K/Mcku1kNeBbPjBUA3nh /G60Y1OfHXnBW4Rrgt8rMfpOR5zUxy9U+PvMrRBDQ3l38nWuc/IxxgBwthDBJ022r6zP YksYS4cTTdqAhcJrL4YDpn0ii5FWeS+m9nhBcDhvhQFCsYDRqbYs4nNG2TNTd0ZIir9V RJTI4+Jjx70VmCnKhEoEo30olsgwRu2wwIAoJFGNOSsm8Vaxmsqb+Si8SWDjRWHQ+oRC Az388HnAv/IsK6UYo9xOdQNgkLMFNjr/j3OHPAuHMgaXV6ORVcW21Dwd3wEuzGzpsx6P o9jw== 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 m7si13409406oih.7.2020.01.17.09.59.31; Fri, 17 Jan 2020 09:59:43 -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 S1728992AbgAQR6h (ORCPT + 99 others); Fri, 17 Jan 2020 12:58:37 -0500 Received: from mga09.intel.com ([134.134.136.24]:44893 "EHLO mga09.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726761AbgAQR6h (ORCPT ); Fri, 17 Jan 2020 12:58:37 -0500 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by orsmga102.jf.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="426077015" Received: from black.fi.intel.com ([10.237.72.28]) by fmsmga006.fm.intel.com with ESMTP; 17 Jan 2020 09:56:31 -0800 Received: by black.fi.intel.com (Postfix, from userid 1003) id 2951634A; 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 , Cezary Rojewski , Pierre-Louis Bossart , Liam Girdwood , Jie Yang , Mark Brown , alsa-devel@alsa-project.org Subject: [PATCH v1 7/8] ASoC: Intel: Switch DMI table match to a test of variable Date: Fri, 17 Jan 2020 19:56:25 +0200 Message-Id: <20200117175626.56358-7-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. Cc: Cezary Rojewski Cc: Pierre-Louis Bossart Cc: Liam Girdwood Cc: Jie Yang Cc: Mark Brown Cc: alsa-devel@alsa-project.org Signed-off-by: Andy Shevchenko --- .../intel/common/soc-acpi-intel-cht-match.c | 28 ++----------------- 1 file changed, 3 insertions(+), 25 deletions(-) diff --git a/sound/soc/intel/common/soc-acpi-intel-cht-match.c b/sound/soc/intel/common/soc-acpi-intel-cht-match.c index d0fb43c2b9f6..833d2e130e6e 100644 --- a/sound/soc/intel/common/soc-acpi-intel-cht-match.c +++ b/sound/soc/intel/common/soc-acpi-intel-cht-match.c @@ -5,31 +5,11 @@ * Copyright (c) 2017, Intel Corporation. */ -#include +#include + #include #include -static unsigned long cht_machine_id; - -#define CHT_SURFACE_MACH 1 - -static int cht_surface_quirk_cb(const struct dmi_system_id *id) -{ - cht_machine_id = CHT_SURFACE_MACH; - return 1; -} - -static const struct dmi_system_id cht_table[] = { - { - .callback = cht_surface_quirk_cb, - .matches = { - DMI_MATCH(DMI_SYS_VENDOR, "Microsoft Corporation"), - DMI_MATCH(DMI_PRODUCT_NAME, "Surface 3"), - }, - }, - { } -}; - static struct snd_soc_acpi_mach cht_surface_mach = { .id = "10EC5640", .drv_name = "cht-bsw-rt5645", @@ -43,9 +23,7 @@ static struct snd_soc_acpi_mach *cht_quirk(void *arg) { struct snd_soc_acpi_mach *mach = arg; - dmi_check_system(cht_table); - - if (cht_machine_id == CHT_SURFACE_MACH) + if (x86_microsoft_surface_3_machine) return &cht_surface_mach; else return mach; -- 2.24.1