Skip to content

Commit 528d4bc

Browse files
YijingWangbjorn-helgaas
authored andcommitted
PCI: designware: Use pci_scan_root_bus() for simplicity
After b97ea28 ("PCI: Assign resources before drivers claim devices (pci_scan_root_bus())"), pci_scan_root_bus() no longer adds the devices, so it is equivalent to: pci_create_root_bus() pci_scan_child_bus() Use pci_scan_root_bus() to simplify the code. [bhelgaas: changelog] Signed-off-by: Yijing Wang <[email protected]> Signed-off-by: Bjorn Helgaas <[email protected]> Reviewed-by: Lucas Stach <[email protected]> Acked-by: Jingoo Han <[email protected]> CC: Mohit Kumar <[email protected]>
1 parent 915ad86 commit 528d4bc

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

drivers/pci/host/pcie-designware.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -728,13 +728,11 @@ static struct pci_bus *dw_pcie_scan_bus(int nr, struct pci_sys_data *sys)
728728
struct pcie_port *pp = sys_to_pcie(sys);
729729

730730
pp->root_bus_nr = sys->busnr;
731-
bus = pci_create_root_bus(pp->dev, sys->busnr,
731+
bus = pci_scan_root_bus(pp->dev, sys->busnr,
732732
&dw_pcie_ops, sys, &sys->resources);
733733
if (!bus)
734734
return NULL;
735735

736-
pci_scan_child_bus(bus);
737-
738736
if (bus && pp->ops->scan_bus)
739737
pp->ops->scan_bus(pp);
740738

0 commit comments

Comments
 (0)