From patchwork Mon Jul 17 11:45:03 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: 13315494 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 01D0FC001DC for ; Mon, 17 Jul 2023 11:48:41 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 014AFBC0; Mon, 17 Jul 2023 13:47:50 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 014AFBC0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1689594520; bh=+YlPYl9D46pUnlZCp2j4XddAuRLCst0K7iLJIQCN+g0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=TnDloLhjNzuLhkTYjtkAmkAh7pSmutjHREMkjwDiXL1HUJVeNORnjXfFSOlt1cmxk ULlXB1xEQ5RfsuNgdJVDLfHGLMrgrCPJpC/xf8nWPUXoiY7ddeg4r7El2FBG8eDeFh 0W2muA5pmHmUJiynScvN/sJVs6ZVIbYKYLfpZZf0= Received: by alsa1.perex.cz (Postfix, from userid 50401) id 28219F805C3; Mon, 17 Jul 2023 13:46:07 +0200 (CEST) Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id B818CF805C2; Mon, 17 Jul 2023 13:46:06 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id A7B77F80571; Mon, 17 Jul 2023 13:45:56 +0200 (CEST) Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 950E0F80567 for ; Mon, 17 Jul 2023 13:45:46 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 950E0F80567 Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key, unprotected) header.d=intel.com header.i=@intel.com header.a=rsa-sha256 header.s=Intel header.b=Qvncqe/o DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1689594347; x=1721130347; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=+YlPYl9D46pUnlZCp2j4XddAuRLCst0K7iLJIQCN+g0=; b=Qvncqe/oAQuA+0zuvcV4IFnLZnUE+0MHZAbCOT6gUBc6zrKNMsW7uhV0 //0qalWs714yz9y3UEWAb/uF6Lw2lY0N9P+iTQeydykQUOqpAP9jJPaQW LHkBG35g3IwNEy9wuOly7AohIObxyoQ5PSt9SghXKhUXVLF64CMF32XpL G3SjwchLW5ujX4AdkGy35pXGMxDkyk/TYvr1r5xam9+iwKBW0d7yZMErH c6RMj4kr8RL95WJHrwD7iooG1pAbhLdJSyWNHcUm1RR4K7IZjaGtUorK2 LY4DndA2dk/XrbLoQ7GhHmRGT9EC2B4RehZLSdN0R5q7av6xqvJu5sBm5 A==; X-IronPort-AV: E=McAfee;i="6600,9927,10773"; a="363372870" X-IronPort-AV: E=Sophos;i="6.01,211,1684825200"; d="scan'208";a="363372870" Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 17 Jul 2023 04:45:45 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10773"; a="969856515" X-IronPort-AV: E=Sophos;i="6.01,211,1684825200"; d="scan'208";a="969856515" Received: from dev2 (HELO DEV2.igk.intel.com) ([10.237.148.94]) by fmsmga006.fm.intel.com with ESMTP; 17 Jul 2023 04:45:40 -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 , =?utf-8?q?Ilpo_J=C3=A4rvinen?= , Hans de Goede , =?utf-8?q?Amadeusz_S=C5=82awi=C5=84ski?= , Andy Shevchenko Subject: [PATCH v4 07/15] ALSA: hda/i915: Use global PCI match macro Date: Mon, 17 Jul 2023 13:45:03 +0200 Message-Id: <20230717114511.484999-8-amadeuszx.slawinski@linux.intel.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230717114511.484999-1-amadeuszx.slawinski@linux.intel.com> References: <20230717114511.484999-1-amadeuszx.slawinski@linux.intel.com> MIME-Version: 1.0 Message-ID-Hash: QEB63PYUPGEKDNXEGDF6YSYPPIXNAP6C X-Message-ID-Hash: QEB63PYUPGEKDNXEGDF6YSYPPIXNAP6C X-MailFrom: amadeuszx.slawinski@linux.intel.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-alsa-devel.alsa-project.org-0; header-match-alsa-devel.alsa-project.org-1; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.8 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: Instead of using local macro to match PCI device, use global one. Reviewed-by: Andy Shevchenko Acked-by: Mark Brown Reviewed-by: Cezary Rojewski Signed-off-by: Amadeusz Sławiński --- 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 #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);