summaryrefslogtreecommitdiff
path: root/src/device/pci_device.c
diff options
context:
space:
mode:
authorKyösti Mälkki <kyosti.malkki@gmail.com>2015-02-20 21:28:31 +0200
committerKyösti Mälkki <kyosti.malkki@gmail.com>2015-06-04 11:22:09 +0200
commit2d2367cd95dc6ab2dd51b1005675e42bab417769 (patch)
tree6f947cec24aa97e89b833c42297f010e740afd4c /src/device/pci_device.c
parentde271a8f0a9b5d910ee98eeea25f71d4e1536f73 (diff)
devicetree: Single scan_bridges()
Change-Id: Ifd277992a69a4182e2fac92aaf746abe4fec2a1b Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com> Reviewed-on: http://review.coreboot.org/8540 Tested-by: build bot (Jenkins) Reviewed-by: Timothy Pearson <tpearson@raptorengineeringinc.com> Reviewed-by: Patrick Georgi <pgeorgi@google.com>
Diffstat (limited to 'src/device/pci_device.c')
-rw-r--r--src/device/pci_device.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/src/device/pci_device.c b/src/device/pci_device.c
index 188f101038..07b1993b0a 100644
--- a/src/device/pci_device.c
+++ b/src/device/pci_device.c
@@ -1083,7 +1083,6 @@ void pci_scan_bus(struct bus *bus, unsigned min_devfn,
{
unsigned int devfn;
struct device *old_devices;
- struct device *child;
printk(BIOS_DEBUG, "PCI: pci_scan_bus for bus %02x\n", bus->secondary);
@@ -1144,12 +1143,8 @@ void pci_scan_bus(struct bus *bus, unsigned min_devfn,
* For all children that implement scan_bus() (i.e. bridges)
* scan the bus behind that child.
*/
- unsigned int max = bus->secondary;
- for (child = bus->children; child; child = child->sibling)
- max = scan_bus(child, max);
-
- bus->subordinate = max;
+ scan_bridges(bus);
/*
* We've scanned the bus and so we know all about what's on the other