Convert pci_table entries with PCI_ANY_ID to PCI_DEVICE ?
Subsystems (2)
Hi,
I was wondering what you think about changing pci_table entries with subvendor=PCI_ANY_ID and subdevice=PCI_ANY_ID to use the PCI_DEVICE MACRO?
Here's a sample patch:
---
(quoted diff) +0 -0
b/arch/x86/kernel/cpu/cpufreq/gx-suspmod.c
index 16e3483..b0126eb 100644
arch/x86/kernel/cpu/cpufreq/gx-suspmod.c +3 -7
@@ -169,12 +169,9 @@ static int gx_freq_mult[16] = {* Low Level chipset interface * ****************************************************************/ static struct pci_device_id gx_chipset_tbl[]__initdata = { - {PCI_VENDOR_ID_CYRIX ,PCI_DEVICE_ID_CYRIX_5530_LEGACY , -PCI_ANY_ID ,PCI_ANY_ID }, - {PCI_VENDOR_ID_CYRIX ,PCI_DEVICE_ID_CYRIX_5520 , -PCI_ANY_ID ,PCI_ANY_ID }, - {PCI_VENDOR_ID_CYRIX ,PCI_DEVICE_ID_CYRIX_5510 , -PCI_ANY_ID ,PCI_ANY_ID }, + {PCI_DEVICE (PCI_VENDOR_ID_CYRIX ,PCI_DEVICE_ID_CYRIX_5530_LEGACY ) }, + {PCI_DEVICE (PCI_VENDOR_ID_CYRIX ,PCI_DEVICE_ID_CYRIX_5520 ) }, + {PCI_DEVICE (PCI_VENDOR_ID_CYRIX ,PCI_DEVICE_ID_CYRIX_5510 ) }, {0 , }, }; ---
Do you think it's worth the effort (e.g. in terms of readability) to convert the entries?
Thanks,
Peter
Or even better convert them using PCI_VDEVICE,
Here's the same sample patch with PCI_VDEVICE:
---
(quoted diff) +0 -0
b/arch/x86/kernel/cpu/cpufreq/gx-suspmod.c
index 16e3483..581b29c 100644
arch/x86/kernel/cpu/cpufreq/gx-suspmod.c +3 -7
@@ -169,12 +169,9 @@ static int gx_freq_mult[16] = {* Low Level chipset interface * ****************************************************************/ static struct pci_device_id gx_chipset_tbl[]__initdata = { - {PCI_VENDOR_ID_CYRIX ,PCI_DEVICE_ID_CYRIX_5530_LEGACY , -PCI_ANY_ID ,PCI_ANY_ID }, - {PCI_VENDOR_ID_CYRIX ,PCI_DEVICE_ID_CYRIX_5520 , -PCI_ANY_ID ,PCI_ANY_ID }, - {PCI_VENDOR_ID_CYRIX ,PCI_DEVICE_ID_CYRIX_5510 , -PCI_ANY_ID ,PCI_ANY_ID }, + {PCI_VDEVICE (CYRIX ,PCI_DEVICE_ID_CYRIX_5530_LEGACY ) }, + {PCI_VDEVICE (CYRIX ,PCI_DEVICE_ID_CYRIX_5520 ) }, + {PCI_VDEVICE (CYRIX ,PCI_DEVICE_ID_CYRIX_5510 ) }, {0 , }, }; ---
What do you think?