diff options
author | Hauke Mehrtens <hauke@hauke-m.de> | 2015-05-24 22:37:02 +0200 |
---|---|---|
committer | Bjorn Helgaas <bhelgaas@google.com> | 2015-05-27 18:27:54 -0500 |
commit | 18c4342aa56d70176eea85021e6fe8f6f8f39c7b (patch) | |
tree | bbd138c03d8ca533fee4362b0325eb79340a92da /drivers/pci/host/pcie-iproc.c | |
parent | 4785ffbdc9b52e308e43b9e2dcc1dca44f056d76 (diff) | |
download | talos-op-linux-18c4342aa56d70176eea85021e6fe8f6f8f39c7b.tar.gz talos-op-linux-18c4342aa56d70176eea85021e6fe8f6f8f39c7b.zip |
PCI: iproc: Directly add PCI resources
The struct iproc_pcie.resources member was pointing to a stack variable and
is invalid after the registration function returned.
Remove this pointer and add a parameter to the function.
Tested-by: Ray Jui <rjui@broadcom.com>
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Reviewed-by: Ray Jui <rjui@broadcom.com>
Diffstat (limited to 'drivers/pci/host/pcie-iproc.c')
-rw-r--r-- | drivers/pci/host/pcie-iproc.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/pci/host/pcie-iproc.c b/drivers/pci/host/pcie-iproc.c index cef31f6a1242..d77481ea553e 100644 --- a/drivers/pci/host/pcie-iproc.c +++ b/drivers/pci/host/pcie-iproc.c @@ -183,7 +183,7 @@ static void iproc_pcie_enable(struct iproc_pcie *pcie) writel(SYS_RC_INTX_MASK, pcie->base + SYS_RC_INTX_EN); } -int iproc_pcie_setup(struct iproc_pcie *pcie) +int iproc_pcie_setup(struct iproc_pcie *pcie, struct list_head *res) { int ret; struct pci_bus *bus; @@ -211,7 +211,7 @@ int iproc_pcie_setup(struct iproc_pcie *pcie) pcie->sysdata.private_data = pcie; bus = pci_create_root_bus(pcie->dev, 0, &iproc_pcie_ops, - &pcie->sysdata, pcie->resources); + &pcie->sysdata, res); if (!bus) { dev_err(pcie->dev, "unable to create PCI root bus\n"); ret = -ENOMEM; |