Message ID | 20230711125726.3509391-6-amadeuszx.slawinski@linux.intel.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:a6b2:0:b0:3e4:2afc:c1 with SMTP id c18csp460777vqm; Tue, 11 Jul 2023 06:04:31 -0700 (PDT) X-Google-Smtp-Source: APBJJlHuEQ9MGqarKLh6ZQD8q/c0AhEgWpuePtNuPM2Efv9Vnh3ojWzB7vr7qfPNgi8Drz9b7PZQ X-Received: by 2002:a05:6a20:4410:b0:12e:98a3:77b7 with SMTP id ce16-20020a056a20441000b0012e98a377b7mr14167690pzb.59.1689080671447; Tue, 11 Jul 2023 06:04:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1689080671; cv=none; d=google.com; s=arc-20160816; b=ufgpA6oquXznYYRDVVk+CtMJ1L+aL7GDLUi7HwiQNNmufCmC+VOaZ0ML0CSo0ELZc+ kxyNo5qcgf4ABNXRdgJBDydwpTxxkp2U64vTh9nfSwMe8p998glG+21plrCmHgm5E2gS HORdtRuxYxUABFsZP4RBtMN35noLTrUtvpk2LET+KsvUCnfMy56ltQUKd+hczyl9vZ6y SAZOTncn5JCtWbqceM3KeqVwahdbCHi0Nc85cS40325UUZiAbLjAV5HhMwoQjSrN47/2 Ao6TEOM3SyRc00FyrPfvj1b8wvhNjqFVLcY2DRc8J2oQVklwrs2DYHKHCLW7XIiNkPEN tF9Q== 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=mwp9WYRJNVjyCqNo9ncNRDUCYtJVDHW0gQKCJCyVYSU=; fh=sKxO7Xj+YIOQJw2gBVYevujm0+5GA4/lF0Hs7SAhyQ0=; b=aQWH/pBDFUnuvO2lqao/TmnMFXxdApZ3vkfw0dUQMDg1KSLUsyGC6xJ5tlSUVB4GsZ 01ioul0kxEhfA7WKnPdkpjtDFLT47MxTXTxcMl+Vzrq4xC8bSkemFODLQOUZvjGyBNqy F/Poj0NVDekEdYD7ew/ju1CtZeKz1CqRzsvcPuluHRhS/mMiXDm4cGQ3pP0A03hYidHp vgtwgPzv04rN7Tn3/oL83ZgVBUirqvgAaoyDCJyOv0iG2fjMoZX/7mMTK3bzcO3CgMvD 7k6he0ml74pl3Kx9OsDiaA4LSgEoTMe4h8Qj4MEHkDfbJzAlYn/hIeX0kBxVrEZPwL3O V3mw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=e6WFeEa5; 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 b20-20020a056a000cd400b00682d7cb12cesi1482519pfv.309.2023.07.11.06.04.16; Tue, 11 Jul 2023 06:04:31 -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=e6WFeEa5; 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 S232677AbjGKM6x (ORCPT <rfc822;gnulinuxfreebsd@gmail.com> + 99 others); Tue, 11 Jul 2023 08:58:53 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58922 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232471AbjGKM6t (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Tue, 11 Jul 2023 08:58:49 -0400 Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0479510CA; Tue, 11 Jul 2023 05:58:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1689080302; x=1720616302; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=olsksZzndWsPrzCK5znSpaeExI0MYdc1YrpF7vHeiR4=; b=e6WFeEa58JsuJAwJRd3qtqJfsWhqgFXgzAI05fHWnXQJ8I5JKLDw2rxx WH8KxcocLxEnHTZ0N07bYlw+et3z+2R1+OpuUuiYQDg5PDDatIFuQaUwz 45eApPuwmvLG7nyXxf0XH7MgldbsYDkRxmPdPBRfmQ1aunTDbg6wu9RSn Jzm0IQOB65ZlevOuyKENmPDb6hqdyuhnivwfP2usTEh+vLjstYdEAhOab r4qWG73avPLRZYaS2gs359HMzV5rK6qA9N9c4/Cqo4alL0zZwof/tzmYe UFZkvZABWIrNaG/ZUjg7tl1iUkr/mUAgZzzIQu6RHpBhM1kbGOrmMwTwa A==; X-IronPort-AV: E=McAfee;i="6600,9927,10768"; a="367187432" X-IronPort-AV: E=Sophos;i="6.01,196,1684825200"; d="scan'208";a="367187432" Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 11 Jul 2023 05:57:21 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10768"; a="834666603" X-IronPort-AV: E=Sophos;i="6.01,196,1684825200"; d="scan'208";a="834666603" Received: from dev2 (HELO DEV2.igk.intel.com) ([10.237.148.94]) by fmsmga002.fm.intel.com with ESMTP; 11 Jul 2023 05:57:18 -0700 From: =?utf-8?q?Amadeusz_S=C5=82awi=C5=84ski?= <amadeuszx.slawinski@linux.intel.com> To: Bjorn Helgaas <bhelgaas@google.com>, Mark Brown <broonie@kernel.org>, Takashi Iwai <tiwai@suse.com> Cc: alsa-devel@alsa-project.org, linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org, Cezary Rojewski <cezary.rojewski@intel.com>, Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>, Kai Vehmanen <kai.vehmanen@linux.intel.com>, Andy Shevchenko <andriy.shevchenko@intel.com>, Hans de Goede <hdegoede@redhat.com>, =?utf-8?q?Amadeusz_S=C5=82awi=C5=84ski?= <amadeuszx.slawinski@linux.intel.com> Subject: [PATCH 05/13] ALSA: hda/i915: Use global PCI match macro Date: Tue, 11 Jul 2023 14:57:18 +0200 Message-Id: <20230711125726.3509391-6-amadeuszx.slawinski@linux.intel.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230711125726.3509391-1-amadeuszx.slawinski@linux.intel.com> References: <20230711125726.3509391-1-amadeuszx.slawinski@linux.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_EF,RCVD_IN_DNSWL_BLOCKED, RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,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: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1771129454315576849 X-GMAIL-MSGID: 1771129454315576849 |
Series |
PCI: Define Intel PCI IDs and use them in drivers
|
|
Commit Message
Amadeusz Sławiński
July 11, 2023, 12:57 p.m. UTC
Instead of using local macro to match PCI device, use global one.
Signed-off-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>
---
sound/hda/hdac_i915.c | 7 +------
1 file changed, 1 insertion(+), 6 deletions(-)
Comments
On Tue, Jul 11, 2023 at 02:57:18PM +0200, Amadeusz Sławiński wrote: > Instead of using local macro to match PCI device, use global one. FWIW, Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> > Signed-off-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com> > --- > sound/hda/hdac_i915.c | 7 +------ > 1 file changed, 1 insertion(+), 6 deletions(-) > > 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 <sound/hda_i915.h> > #include <sound/hda_register.h> > > -#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); > -- > 2.34.1 >
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 <sound/hda_i915.h> #include <sound/hda_register.h> -#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);