aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/pci/bus.c11
-rw-r--r--drivers/pci/probe.c3
2 files changed, 3 insertions, 11 deletions
diff --git a/drivers/pci/bus.c b/drivers/pci/bus.c
index 8647dc6f52d0..bdc1e8bf7e60 100644
--- a/drivers/pci/bus.c
+++ b/drivers/pci/bus.c
@@ -206,16 +206,9 @@ void pci_bus_add_devices(const struct pci_bus *bus)
206 206
207 list_for_each_entry(dev, &bus->devices, bus_list) { 207 list_for_each_entry(dev, &bus->devices, bus_list) {
208 BUG_ON(!dev->is_added); 208 BUG_ON(!dev->is_added);
209
210 child = dev->subordinate; 209 child = dev->subordinate;
211 210 if (child)
212 if (!child) 211 pci_bus_add_devices(child);
213 continue;
214 pci_bus_add_devices(child);
215
216 if (child->is_added)
217 continue;
218 child->is_added = 1;
219 } 212 }
220} 213}
221 214
diff --git a/drivers/pci/probe.c b/drivers/pci/probe.c
index b494066ef32f..45c93b39af35 100644
--- a/drivers/pci/probe.c
+++ b/drivers/pci/probe.c
@@ -1627,8 +1627,7 @@ unsigned int pci_scan_child_bus(struct pci_bus *bus)
1627 if (!bus->is_added) { 1627 if (!bus->is_added) {
1628 dev_dbg(&bus->dev, "fixups for bus\n"); 1628 dev_dbg(&bus->dev, "fixups for bus\n");
1629 pcibios_fixup_bus(bus); 1629 pcibios_fixup_bus(bus);
1630 if (pci_is_root_bus(bus)) 1630 bus->is_added = 1;
1631 bus->is_added = 1;
1632 } 1631 }
1633 1632
1634 for (pass=0; pass < 2; pass++) 1633 for (pass=0; pass < 2; pass++)