diff --git a/drivers/pci/hotplug/fakephp.c b/drivers/pci/hotplug/fakephp.c --- a/drivers/pci/hotplug/fakephp.c +++ b/drivers/pci/hotplug/fakephp.c @@ -144,7 +144,7 @@ static int __init pci_scan_buses(void) struct pci_dev *dev = NULL; int retval = 0; - while ((dev = pci_get_device(PCI_ANY_ID, PCI_ANY_ID, dev)) != NULL) { + for_each_pci_dev(dev) { retval = add_slot(dev); if (retval) { pci_dev_put(dev);