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: Rob Herring <robh@kernel.org> Signed-off-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com> Acked-by: Bjorn Helgaas <bhelgaas@google.com> Cc: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com> Cc: Bjorn Helgaas <bhelgaas@google.com>
This commit is contained in:

committed by
Lorenzo Pieralisi

parent
79cbde56f9
commit
6a589900d0
@@ -329,7 +329,6 @@ static int rcar_pcie_enable(struct rcar_pcie_host *host)
|
||||
{
|
||||
struct pci_host_bridge *bridge = pci_host_bridge_from_priv(host);
|
||||
struct rcar_pcie *pcie = &host->pcie;
|
||||
struct device *dev = pcie->dev;
|
||||
|
||||
/* Try setting 5 GT/s link speed */
|
||||
rcar_pcie_force_speedup(pcie);
|
||||
@@ -338,7 +337,6 @@ static int rcar_pcie_enable(struct rcar_pcie_host *host)
|
||||
|
||||
pci_add_flags(PCI_REASSIGN_ALL_BUS);
|
||||
|
||||
bridge->dev.parent = dev;
|
||||
bridge->sysdata = host;
|
||||
bridge->busnr = host->root_bus_nr;
|
||||
bridge->ops = &rcar_pcie_ops;
|
||||
|
Reference in New Issue
Block a user