Commit 981cf9ea authored by Jiang Liu's avatar Jiang Liu Committed by Bjorn Helgaas

PCI: Clean up usages of pci_bus->is_added

Now pci_bus->is_added is only used to guard invoking of
pcibios_fixup_bus() in pci_scan_child_bus(), so just set
it directly after the fixups and remove the other test
and set in pci_bus_add_devices().

[bhelgaas: changelog]
Signed-off-by: default avatarJiang Liu <jiang.liu@huawei.com>
Signed-off-by: default avatarBjorn Helgaas <bhelgaas@google.com>
Reviewed-by: default avatarYinghai Lu <yinghai@kernel.org>
parent 1e89d268
...@@ -206,16 +206,9 @@ void pci_bus_add_devices(const struct pci_bus *bus) ...@@ -206,16 +206,9 @@ void pci_bus_add_devices(const struct pci_bus *bus)
list_for_each_entry(dev, &bus->devices, bus_list) { list_for_each_entry(dev, &bus->devices, bus_list) {
BUG_ON(!dev->is_added); BUG_ON(!dev->is_added);
child = dev->subordinate; child = dev->subordinate;
if (child)
if (!child) pci_bus_add_devices(child);
continue;
pci_bus_add_devices(child);
if (child->is_added)
continue;
child->is_added = 1;
} }
} }
......
...@@ -1627,8 +1627,7 @@ unsigned int pci_scan_child_bus(struct pci_bus *bus) ...@@ -1627,8 +1627,7 @@ unsigned int pci_scan_child_bus(struct pci_bus *bus)
if (!bus->is_added) { if (!bus->is_added) {
dev_dbg(&bus->dev, "fixups for bus\n"); dev_dbg(&bus->dev, "fixups for bus\n");
pcibios_fixup_bus(bus); pcibios_fixup_bus(bus);
if (pci_is_root_bus(bus)) bus->is_added = 1;
bus->is_added = 1;
} }
for (pass=0; pass < 2; pass++) for (pass=0; pass < 2; pass++)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment