From: Bjorn Helgaas Date: Mon, 26 Aug 2013 21:40:03 +0000 (-0600) Subject: Merge branch 'pci/yinghai-assign-unassigned-v6' into next X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=1193725f543c92a77c73769bc2fbe48c53275f53;p=linux-beck.git Merge branch 'pci/yinghai-assign-unassigned-v6' into next * pci/yinghai-assign-unassigned-v6: PCI: Assign resources for hot-added host bridge more aggressively PCI: Move resource reallocation code to non-__init PCI: Delay enabling bridges until they're needed PCI: Assign resources on a per-bus basis PCI: Enable unassigned resource reallocation on per-bus basis PCI: Turn on reallocation for unassigned resources with host bridge offset PCI: Look for unassigned resources on per-bus basis PCI: Drop temporary variable in pci_assign_unassigned_resources() --- 1193725f543c92a77c73769bc2fbe48c53275f53 diff --cc drivers/pci/setup-bus.c index 8333c92c2027,94b777d108bb..9be359594b05 --- a/drivers/pci/setup-bus.c +++ b/drivers/pci/setup-bus.c @@@ -1297,15 -1297,18 +1297,15 @@@ static void pci_bus_dump_resources(stru } } - static int __init pci_bus_get_depth(struct pci_bus *bus) + static int pci_bus_get_depth(struct pci_bus *bus) { int depth = 0; - struct pci_dev *dev; + struct pci_bus *child_bus; - list_for_each_entry(dev, &bus->devices, bus_list) { + list_for_each_entry(child_bus, &bus->children, node){ int ret; - struct pci_bus *b = dev->subordinate; - if (!b) - continue; - ret = pci_bus_get_depth(b); + ret = pci_bus_get_depth(child_bus); if (ret + 1 > depth) depth = ret + 1; }