diff mbox series

[v2,07/15] ALSA: hda/i915: Use global PCI match macro

Message ID 20230714185615.370597-8-amadeuszx.slawinski@linux.intel.com
State New
Headers show
Series PCI: Define Intel PCI IDs and use them in drivers | expand

Commit Message

Amadeusz Sławiński July 14, 2023, 6:56 p.m. UTC
Instead of using local macro to match PCI device, use global one.

Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>
---
 include/linux/pci_ids.h | 1 -
 sound/hda/hdac_i915.c   | 7 +------
 2 files changed, 1 insertion(+), 7 deletions(-)

Comments

Andy Shevchenko July 14, 2023, 11:20 a.m. UTC | #1
On Fri, Jul 14, 2023 at 08:56:07PM +0200, Amadeusz Sławiński wrote:
> Instead of using local macro to match PCI device, use global one.

...

> @@ -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

Looks like it should be a separate change.
Amadeusz Sławiński July 14, 2023, 11:23 a.m. UTC | #2
On 7/14/2023 1:20 PM, Andy Shevchenko wrote:
> On Fri, Jul 14, 2023 at 08:56:07PM +0200, Amadeusz Sławiński wrote:
>> Instead of using local macro to match PCI device, use global one.
> 
> ...
> 
>> @@ -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
> 
> Looks like it should be a separate change.
> 

Oops... must have fixed up wrong patch, and I even looked at all patches 
before sending them, to check for something like that :|
diff mbox series

Patch

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 <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);