From: Yijing Wang Date: Tue, 28 Apr 2015 07:01:37 +0000 (+0800) Subject: PCI: designware: Use pci_scan_root_bus() for simplicity X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=528d4bce1078f90352df909e8bcfd457d23797b2;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git PCI: designware: Use pci_scan_root_bus() for simplicity After b97ea289cf6a ("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 Signed-off-by: Bjorn Helgaas Reviewed-by: Lucas Stach Acked-by: Jingoo Han CC: Mohit Kumar --- diff --git a/drivers/pci/host/pcie-designware.c b/drivers/pci/host/pcie-designware.c index 2e9f84fdd9ce..8c80f3850d21 100644 --- a/drivers/pci/host/pcie-designware.c +++ b/drivers/pci/host/pcie-designware.c @@ -728,13 +728,11 @@ static struct pci_bus *dw_pcie_scan_bus(int nr, struct pci_sys_data *sys) struct pcie_port *pp = sys_to_pcie(sys); pp->root_bus_nr = sys->busnr; - bus = pci_create_root_bus(pp->dev, sys->busnr, + bus = pci_scan_root_bus(pp->dev, sys->busnr, &dw_pcie_ops, sys, &sys->resources); if (!bus) return NULL; - pci_scan_child_bus(bus); - if (bus && pp->ops->scan_bus) pp->ops->scan_bus(pp);