diff options
author | Jiang Liu <liuj97@gmail.com> | 2013-04-12 01:44:16 -0400 |
---|---|---|
committer | Bjorn Helgaas <bhelgaas@google.com> | 2013-04-12 17:38:25 -0400 |
commit | 981cf9ea9a6a6c422e51fc04bedad00b7792ccbc (patch) | |
tree | 33efdbede82837af7a0034f809ffb484a326dab5 /drivers/pci/bus.c | |
parent | 1e89d268e7a83d8388d4d09d3f2089ced72cc15f (diff) |
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/pci/bus.c')
-rw-r--r-- | drivers/pci/bus.c | 11 |
1 files changed, 2 insertions, 9 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 | ||