diff --git a/arch/i386/kernel/cpu/cpufreq/gx-suspmod.c b/arch/i386/kernel/cpu/cpufreq/gx-suspmod.c --- a/arch/i386/kernel/cpu/cpufreq/gx-suspmod.c +++ b/arch/i386/kernel/cpu/cpufreq/gx-suspmod.c @@ -189,11 +189,9 @@ static __init struct pci_dev *gx_detect_ } /* detect which companion chip is used */ - while ((gx_pci = pci_get_device(PCI_ANY_ID, PCI_ANY_ID, gx_pci)) != NULL) { - if ((pci_match_id(gx_chipset_tbl, gx_pci)) != NULL) { + for_each_pci_dev(gx_pci) + if ((pci_match_id(gx_chipset_tbl, gx_pci)) != NULL) return gx_pci; - } - } dprintk("error: no supported chipset found!\n"); return NULL;