aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/pci/pci.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/pci/pci.c')
-rw-r--r--drivers/pci/pci.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c
index d62a5de8167..f4a2738bf0b 100644
--- a/drivers/pci/pci.c
+++ b/drivers/pci/pci.c
@@ -386,10 +386,9 @@ pci_find_parent_resource(const struct pci_dev *dev, struct resource *res)
386{ 386{
387 const struct pci_bus *bus = dev->bus; 387 const struct pci_bus *bus = dev->bus;
388 int i; 388 int i;
389 struct resource *best = NULL; 389 struct resource *best = NULL, *r;
390 390
391 for(i = 0; i < PCI_BUS_NUM_RESOURCES; i++) { 391 pci_bus_for_each_resource(bus, r, i) {
392 struct resource *r = bus->resource[i];
393 if (!r) 392 if (!r)
394 continue; 393 continue;
395 if (res->start && !(res->start >= r->start && res->end <= r->end)) 394 if (res->start && !(res->start >= r->start && res->end <= r->end))