Skip to content

Commit c63aed7

Browse files
robherringLorenzo Pieralisi
authored andcommitted
PCI: altera: Use pci_host_probe() to register host
The altera host driver does the same host registration and bus scanning calls as pci_host_probe, so let's use it instead. The only difference is pci_assign_unassigned_bus_resources() was called instead of pci_bus_size_bridges() and pci_bus_assign_resources(). This should be the same. Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Rob Herring <[email protected]> Signed-off-by: Lorenzo Pieralisi <[email protected]> Reviewed-by: Ley Foon Tan <[email protected]> Cc: Ley Foon Tan <[email protected]> Cc: [email protected]
1 parent 97c5372 commit c63aed7

File tree

1 file changed

+1
-16
lines changed

1 file changed

+1
-16
lines changed

drivers/pci/controller/pcie-altera.c

Lines changed: 1 addition & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -773,8 +773,6 @@ static int altera_pcie_probe(struct platform_device *pdev)
773773
{
774774
struct device *dev = &pdev->dev;
775775
struct altera_pcie *pcie;
776-
struct pci_bus *bus;
777-
struct pci_bus *child;
778776
struct pci_host_bridge *bridge;
779777
int ret;
780778
const struct of_device_id *match;
@@ -825,20 +823,7 @@ static int altera_pcie_probe(struct platform_device *pdev)
825823
bridge->map_irq = of_irq_parse_and_map_pci;
826824
bridge->swizzle_irq = pci_common_swizzle;
827825

828-
ret = pci_scan_root_bus_bridge(bridge);
829-
if (ret < 0)
830-
return ret;
831-
832-
bus = bridge->bus;
833-
834-
pci_assign_unassigned_bus_resources(bus);
835-
836-
/* Configure PCI Express setting. */
837-
list_for_each_entry(child, &bus->children, node)
838-
pcie_bus_configure_settings(child);
839-
840-
pci_bus_add_devices(bus);
841-
return ret;
826+
return pci_host_probe(bridge);
842827
}
843828

844829
static int altera_pcie_remove(struct platform_device *pdev)

0 commit comments

Comments
 (0)