Commit 6a589900 authored by Rob Herring's avatar Rob Herring Committed by Lorenzo Pieralisi
Browse files

PCI: Set default bridge parent device

The host bridge's parent device is always the platform device. As we
already have a pointer to it in the devres functions, let's initialize
the parent device. Drivers can still override the parent if desired.

Link: https://lore.kernel.org/r/20200722022514.1283916-3-robh@kernel.org


Signed-off-by: default avatarRob Herring <robh@kernel.org>
Signed-off-by: default avatarLorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Acked-by: default avatarBjorn Helgaas <bhelgaas@google.com>
Cc: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Cc: Bjorn Helgaas <bhelgaas@google.com>
parent 79cbde56
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -241,7 +241,6 @@ int cdns_pcie_host_setup(struct cdns_pcie_rc *rc)
	if (ret)
		goto err_init;

	bridge->dev.parent = dev;
	bridge->busnr = pcie->bus;
	bridge->ops = &cdns_pcie_host_ops;
	bridge->map_irq = of_irq_parse_and_map_pci;
+0 −1
Original line number Diff line number Diff line
@@ -475,7 +475,6 @@ int dw_pcie_host_init(struct pcie_port *pp)

	pp->root_bus_nr = pp->busn->start;

	bridge->dev.parent = dev;
	bridge->sysdata = pp;
	bridge->busnr = pp->root_bus_nr;
	bridge->ops = &dw_pcie_ops;
+0 −1
Original line number Diff line number Diff line
@@ -605,7 +605,6 @@ int mobiveil_pcie_host_probe(struct mobiveil_pcie *pcie)
	}

	/* Initialize bridge */
	bridge->dev.parent = dev;
	bridge->sysdata = pcie;
	bridge->busnr = rp->root_bus_nr;
	bridge->ops = &mobiveil_pcie_ops;
+0 −1
Original line number Diff line number Diff line
@@ -1183,7 +1183,6 @@ static int advk_pcie_probe(struct platform_device *pdev)
		return ret;
	}

	bridge->dev.parent = dev;
	bridge->sysdata = pcie;
	bridge->busnr = 0;
	bridge->ops = &advk_pcie_ops;
+0 −1
Original line number Diff line number Diff line
@@ -436,7 +436,6 @@ static int faraday_pci_probe(struct platform_device *pdev)
	if (!host)
		return -ENOMEM;

	host->dev.parent = dev;
	host->ops = &faraday_pci_ops;
	host->busnr = 0;
	host->msi = NULL;
Loading