* Convert pci_table entries with PCI_ANY_ID to PCI_DEVICE ?
@ 2010-07-15 13:50 Peter Hüwe
2010-07-15 13:57 ` Peter Hüwe
0 siblings, 1 reply; 2+ messages in thread
From: Peter Hüwe @ 2010-07-15 13:50 UTC (permalink / raw)
To: kernel-janitors
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:
---
diff --git a/arch/x86/kernel/cpu/cpufreq/gx-suspmod.c
b/arch/x86/kernel/cpu/cpufreq/gx-suspmod.c
index 16e3483..b0126eb 100644
--- a/arch/x86/kernel/cpu/cpufreq/gx-suspmod.c
+++ b/arch/x86/kernel/cpu/cpufreq/gx-suspmod.c
@@ -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
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: Convert pci_table entries with PCI_ANY_ID to PCI_DEVICE ?
2010-07-15 13:50 Convert pci_table entries with PCI_ANY_ID to PCI_DEVICE ? Peter Hüwe
@ 2010-07-15 13:57 ` Peter Hüwe
0 siblings, 0 replies; 2+ messages in thread
From: Peter Hüwe @ 2010-07-15 13:57 UTC (permalink / raw)
To: kernel-janitors
Or even better convert them using PCI_VDEVICE,
Here's the same sample patch with PCI_VDEVICE:
---
diff --git a/arch/x86/kernel/cpu/cpufreq/gx-suspmod.c
b/arch/x86/kernel/cpu/cpufreq/gx-suspmod.c
index 16e3483..581b29c 100644
--- a/arch/x86/kernel/cpu/cpufreq/gx-suspmod.c
+++ b/arch/x86/kernel/cpu/cpufreq/gx-suspmod.c
@@ -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?
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2010-07-15 13:57 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-07-15 13:50 Convert pci_table entries with PCI_ANY_ID to PCI_DEVICE ? Peter Hüwe
2010-07-15 13:57 ` Peter Hüwe
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox