diff options
author | Jiang Liu <liuj97@gmail.com> | 2013-04-12 05:44:16 +0000 |
---|---|---|
committer | Bjorn Helgaas <bhelgaas@google.com> | 2013-04-12 15:38:25 -0600 |
commit | 981cf9ea9a6a6c422e51fc04bedad00b7792ccbc (patch) | |
tree | 33efdbede82837af7a0034f809ffb484a326dab5 /drivers | |
parent | 1e89d268e7a83d8388d4d09d3f2089ced72cc15f (diff) | |
download | op-kernel-dev-981cf9ea9a6a6c422e51fc04bedad00b7792ccbc.zip op-kernel-dev-981cf9ea9a6a6c422e51fc04bedad00b7792ccbc.tar.gz |
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: Jiang Liu <jiang.liu@huawei.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Reviewed-by: Yinghai Lu <yinghai@kernel.org>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/pci/bus.c | 11 | ||||
-rw-r--r-- | drivers/pci/probe.c | 3 |
2 files changed, 3 insertions, 11 deletions
diff --git a/drivers/pci/bus.c b/drivers/pci/bus.c index 8647dc6..bdc1e8b 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) list_for_each_entry(dev, &bus->devices, bus_list) { BUG_ON(!dev->is_added); - child = dev->subordinate; - - if (!child) - continue; - pci_bus_add_devices(child); - - if (child->is_added) - continue; - child->is_added = 1; + if (child) + pci_bus_add_devices(child); } } diff --git a/drivers/pci/probe.c b/drivers/pci/probe.c index b494066..45c93b3 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) if (!bus->is_added) { dev_dbg(&bus->dev, "fixups for bus\n"); pcibios_fixup_bus(bus); - if (pci_is_root_bus(bus)) - bus->is_added = 1; + bus->is_added = 1; } for (pass=0; pass < 2; pass++) |