[PATCH 05/13] ALSA: hda/i915: Use global PCI match macro

Amadeusz Sławiński posted 13 patches 2 years, 7 months ago
There is a newer version of this series
[PATCH 05/13] ALSA: hda/i915: Use global PCI match macro
Posted by Amadeusz Sławiński 2 years, 7 months ago
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(-)

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

Re: [PATCH 05/13] ALSA: hda/i915: Use global PCI match macro
Posted by Andy Shevchenko 2 years, 7 months ago
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
> 

-- 
With Best Regards,
Andy Shevchenko