Commit 5819c31c authored by Russell King's avatar Russell King Committed by Linus Torvalds

[PATCH] Convert setup-bus resource allocation to use bus->devices

- Convert setup-bus.c resource allocation to scan bus->devices rather
  than bus->children.  As noted previously, newly discovered child
  buses will not be on the parents list of children buses, so when
  we're trying to assign resources, we need to scan the bus for
  devices with subordinate buses rather than using the list of children
  buses.
parent 64964f5b
......@@ -350,6 +350,7 @@ pci_bus_assign_resources(struct pci_bus *bus)
{
struct pci_bus *b;
int found_vga = pbus_assign_resources_sorted(bus);
struct pci_dev *dev;
if (found_vga) {
/* Propagate presence of the VGA to upstream bridges */
......@@ -357,9 +358,12 @@ pci_bus_assign_resources(struct pci_bus *bus)
b->resource[0]->flags |= IORESOURCE_BUS_HAS_VGA;
}
}
list_for_each_entry(b, &bus->children, node) {
pci_bus_assign_resources(b);
pci_setup_bridge(b);
list_for_each_entry(dev, &bus->devices, bus_list) {
b = dev->subordinate;
if (b) {
pci_bus_assign_resources(b);
pci_setup_bridge(b);
}
}
}
EXPORT_SYMBOL(pci_bus_assign_resources);
......
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