diff options
Diffstat (limited to 'drivers/pci/search.c')
-rw-r--r-- | drivers/pci/search.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/pci/search.c b/drivers/pci/search.c index 20d03f772289..9d75dc8ca602 100644 --- a/drivers/pci/search.c +++ b/drivers/pci/search.c | |||
@@ -169,7 +169,7 @@ struct pci_dev *pci_get_domain_bus_and_slot(int domain, unsigned int bus, | |||
169 | { | 169 | { |
170 | struct pci_dev *dev = NULL; | 170 | struct pci_dev *dev = NULL; |
171 | 171 | ||
172 | while ((dev = pci_get_device(PCI_ANY_ID, PCI_ANY_ID, dev)) != NULL) { | 172 | for_each_pci_dev(dev) { |
173 | if (pci_domain_nr(dev->bus) == domain && | 173 | if (pci_domain_nr(dev->bus) == domain && |
174 | (dev->bus->number == bus && dev->devfn == devfn)) | 174 | (dev->bus->number == bus && dev->devfn == devfn)) |
175 | return dev; | 175 | return dev; |