diff options
author | Yijing Wang <wangyijing@huawei.com> | 2015-04-28 10:01:37 +0300 |
---|---|---|
committer | Bjorn Helgaas <bhelgaas@google.com> | 2015-05-27 19:40:36 +0300 |
commit | 528d4bce1078f90352df909e8bcfd457d23797b2 (patch) | |
tree | 4c4e0190c89fde0b991d7f9c5309e18c95853bdc /drivers | |
parent | 915ad861b6dae6b5afa0cd8d0593916ba1ca224f (diff) | |
download | linux-528d4bce1078f90352df909e8bcfd457d23797b2.tar.xz |
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 <wangyijing@huawei.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Reviewed-by: Lucas Stach <l.stach@pengutronix.de>
Acked-by: Jingoo Han <jingoohan1@gmail.com>
CC: Mohit Kumar <mohit.kumar@st.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/pci/host/pcie-designware.c | 4 |
1 files changed, 1 insertions, 3 deletions
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); |