aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/pci/setup-bus.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/pci/setup-bus.c')
-rw-r--r--drivers/pci/setup-bus.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/drivers/pci/setup-bus.c b/drivers/pci/setup-bus.c
index 743ed8c48b9c..bf32f07c4efb 100644
--- a/drivers/pci/setup-bus.c
+++ b/drivers/pci/setup-bus.c
@@ -387,8 +387,7 @@ static struct resource *find_free_bus_resource(struct pci_bus *bus, unsigned lon
387 unsigned long type_mask = IORESOURCE_IO | IORESOURCE_MEM | 387 unsigned long type_mask = IORESOURCE_IO | IORESOURCE_MEM |
388 IORESOURCE_PREFETCH; 388 IORESOURCE_PREFETCH;
389 389
390 for (i = 0; i < PCI_BUS_NUM_RESOURCES; i++) { 390 pci_bus_for_each_resource(bus, r, i) {
391 r = bus->resource[i];
392 if (r == &ioport_resource || r == &iomem_resource) 391 if (r == &ioport_resource || r == &iomem_resource)
393 continue; 392 continue;
394 if (r && (r->flags & type_mask) == type && !r->parent) 393 if (r && (r->flags & type_mask) == type && !r->parent)
@@ -803,11 +802,10 @@ static void __ref pci_bus_release_bridge_resources(struct pci_bus *bus,
803 802
804static void pci_bus_dump_res(struct pci_bus *bus) 803static void pci_bus_dump_res(struct pci_bus *bus)
805{ 804{
806 int i; 805 struct resource *res;
807 806 int i;
808 for (i = 0; i < PCI_BUS_NUM_RESOURCES; i++) {
809 struct resource *res = bus->resource[i];
810 807
808 pci_bus_for_each_resource(bus, res, i) {
811 if (!res || !res->end || !res->flags) 809 if (!res || !res->end || !res->flags)
812 continue; 810 continue;
813 811