From patchwork Fri Jul 14 18:56:07 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Amadeusz_S=C5=82awi=C5=84ski?= X-Patchwork-Id: 120422 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:a6b2:0:b0:3e4:2afc:c1 with SMTP id c18csp2430748vqm; Fri, 14 Jul 2023 04:20:57 -0700 (PDT) X-Google-Smtp-Source: APBJJlEKAaAuAzTJGu0VgazBjexIkh8cDmLdCmpgl9F54GxAxq8DdmsmdcQOw3jViEsG2CHKVjKU X-Received: by 2002:a17:906:14e:b0:989:450:e57d with SMTP id 14-20020a170906014e00b009890450e57dmr3651584ejh.73.1689333657532; Fri, 14 Jul 2023 04:20:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1689333657; cv=none; d=google.com; s=arc-20160816; b=IpVOBUvm1TM9v1o1stQNo2kxO2i4XAX36yQ3/wOgtpW1Meemn0Jo2qlC1vGKDk8fI4 PT0AbNACRhrjU9Wk+otNfofgvBFrdwqcTLzNJcZPzhuQ6kwdIGEqjDEUSX4B9Gn1Wg5z zQrVIGyNGTFy2AwZJ2FuNer5LSk7n7UeZAbM4Iy9KaEWjWqC/cgR/BqWNCFqDiecn9J1 kY2nNrxaGQON4f5chk6/o1IvnbY4wM9GkAxvhBDy5YK1aUffS5XXGiYQ2hH1lcWxHWeO UjFS1G9z/Ec376YoutNpYD9hK5sOyiYBmfFfqw//oGcjLdmmBgmiHYWuDG987FtXkhuo a9MA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=+hBEVeqDlaZMs3TUTJV5W+GGMH/ZAul2Fz+ps9O4jWY=; fh=iLu8mJV3L09dzJN6VXkKj+SRT/C9p8fR4gJYErWu4bc=; b=LTZVVZ2ux8K6Okzf5HDvRGKvoYdV3snlxnOfEofrUaFUvrzFkIzEIZV7cbnNmAs77i bqi8A/1KsQ9lcKLjhsafDYH/BI9DeLpsKLx9RTloYPnYCsW74f2J+gD4n7el2q6y+eyo t67RgG9GrW8zP53hc644nkxXCAfu2BpR3ZHzbQKm3T7+y6CJB080GRb6DFeuhvMkjOou A2fGmx9CNOys/usVtx6WZF884OwQKP6DDitK7GLmkaBPBTpvKSmL/gC/Ui+KyHHgd7hN Kuztvc1ehcyC3cUMGaCRvgslf555gR99OjlNcpTs0GZoKxqM0Ssd+mcC6hZcZn09bGwp zJaw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=SSD4+lJj; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id fy13-20020a170906b7cd00b009930ed47c80si8039539ejb.893.2023.07.14.04.20.33; Fri, 14 Jul 2023 04:20:57 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=SSD4+lJj; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236320AbjGNKzw (ORCPT + 99 others); Fri, 14 Jul 2023 06:55:52 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51436 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236255AbjGNKza (ORCPT ); Fri, 14 Jul 2023 06:55:30 -0400 Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0852E30FD; Fri, 14 Jul 2023 03:55:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1689332124; x=1720868124; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=s7A7UshZnQEGaR97JLBqMpbiEE9phIPybyuk0Y8+oQg=; b=SSD4+lJjJpEDe/NG7BNhqSZuxa1tDPRlmzkkRz1fdje4kKYF6iktEbNP Z8ySpY/s5C6sk5V11TB2GAJIUXw+lXuRazV7WcKBI0IHLGIE+NK0c/bnz XlaGYOmEivuFiDip/uJyn8V3s1TES6CK5XkHJhb2IZKRWLM7ZA6B4D2p6 C0Nyb9MnLtTpoArasjn8pvKG7Ui3ihsTq1/0CPlsFsk4ERDVRRL8SSVWf Bv2iBbuuRxmB+40Zlls2QtlsPIHzm5paAbiaaUi7ZkZ/0WgQoUH+Ij2HA 15ikItqJe55d3QRLYii9IFm5Mi0+VpTrh3kaPSda8xZmOHvr4bBvIJ22c g==; X-IronPort-AV: E=McAfee;i="6600,9927,10770"; a="364321180" X-IronPort-AV: E=Sophos;i="6.01,205,1684825200"; d="scan'208";a="364321180" Received: from orsmga002.jf.intel.com ([10.7.209.21]) by fmsmga104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 14 Jul 2023 03:55:23 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10770"; a="722365495" X-IronPort-AV: E=Sophos;i="6.01,205,1684825200"; d="scan'208";a="722365495" Received: from dev2 (HELO DEV2.igk.intel.com) ([10.237.148.94]) by orsmga002.jf.intel.com with ESMTP; 14 Jul 2023 03:55:20 -0700 From: =?utf-8?q?Amadeusz_S=C5=82awi=C5=84ski?= To: Bjorn Helgaas , Mark Brown , Takashi Iwai Cc: alsa-devel@alsa-project.org, linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org, Cezary Rojewski , Pierre-Louis Bossart , Kai Vehmanen , Andy Shevchenko , Hans de Goede , =?utf-8?q?Amadeusz_S=C5=82awi=C5=84ski?= , Andy Shevchenko Subject: [PATCH v2 07/15] ALSA: hda/i915: Use global PCI match macro Date: Fri, 14 Jul 2023 20:56:07 +0200 Message-Id: <20230714185615.370597-8-amadeuszx.slawinski@linux.intel.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230714185615.370597-1-amadeuszx.slawinski@linux.intel.com> References: <20230714185615.370597-1-amadeuszx.slawinski@linux.intel.com> MIME-Version: 1.0 X-Spam-Status: No, score=-2.4 required=5.0 tests=BAYES_00,DATE_IN_FUTURE_06_12, DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_NONE,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1771394729118145758 X-GMAIL-MSGID: 1771394729118145758 Instead of using local macro to match PCI device, use global one. Reviewed-by: Andy Shevchenko Signed-off-by: Amadeusz Sławiński --- include/linux/pci_ids.h | 1 - sound/hda/hdac_i915.c | 7 +------ 2 files changed, 1 insertion(+), 7 deletions(-) diff --git a/include/linux/pci_ids.h b/include/linux/pci_ids.h index eb0b3ad64246..d4392f7c51a1 100644 --- a/include/linux/pci_ids.h +++ b/include/linux/pci_ids.h @@ -2718,7 +2718,6 @@ #define PCI_DEVICE_ID_INTEL_82840_HB 0x1a21 #define PCI_DEVICE_ID_INTEL_82845_HB 0x1a30 #define PCI_DEVICE_ID_INTEL_IOAT 0x1a38 -#define PCI_DEVICE_ID_INTEL_HDA_APL_T 0x1a98 #define PCI_DEVICE_ID_INTEL_HDA_CPT 0x1c20 #define PCI_DEVICE_ID_INTEL_COUGARPOINT_LPC_MIN 0x1c41 #define PCI_DEVICE_ID_INTEL_COUGARPOINT_LPC_MAX 0x1c5f diff --git a/sound/hda/hdac_i915.c b/sound/hda/hdac_i915.c index 161a9711cd63..2a451ff4fe6a 100644 --- a/sound/hda/hdac_i915.c +++ b/sound/hda/hdac_i915.c @@ -11,11 +11,6 @@ #include #include -#define IS_HSW_CONTROLLER(pci) (((pci)->device == 0x0a0c) || \ - ((pci)->device == 0x0c0c) || \ - ((pci)->device == 0x0d0c) || \ - ((pci)->device == 0x160c)) - /** * snd_hdac_i915_set_bclk - Reprogram BCLK for HSW/BDW * @bus: HDA core bus @@ -39,7 +34,7 @@ void snd_hdac_i915_set_bclk(struct hdac_bus *bus) if (!acomp || !acomp->ops || !acomp->ops->get_cdclk_freq) return; /* only for i915 binding */ - if (!IS_HSW_CONTROLLER(pci)) + if (!HDA_CONTROLLER_IS_HSW(pci)) return; /* only HSW/BDW */ cdclk_freq = acomp->ops->get_cdclk_freq(acomp->dev);