diff options
author | Jan Kiszka <jan.kiszka@siemens.com> | 2018-05-15 11:07:05 +0200 |
---|---|---|
committer | Bjorn Helgaas <helgaas@kernel.org> | 2018-05-30 11:35:13 -0500 |
commit | 5bd51b35c7cbbc98786282ada940429a33b52e17 (patch) | |
tree | 8074a74b42e82024cce8ad51c2cce56f05db275a /drivers/pci/host/pcie-iproc-platform.c | |
parent | d9c5d5ac287caaa1bc17406ee16ce20f124e5583 (diff) | |
download | linux-5bd51b35c7cbbc98786282ada940429a33b52e17.tar.gz linux-5bd51b35c7cbbc98786282ada940429a33b52e17.tar.bz2 linux-5bd51b35c7cbbc98786282ada940429a33b52e17.zip |
PCI: Rework of_pci_get_host_bridge_resources() to devm_of_pci_get_host_bridge_resources()
of_pci_get_host_bridge_resources() allocates the resource structures it
fills dynamically, but none of its callers care to release them so far.
Rather than requiring everyone to do this explicitly, convert the existing
function to a managed version.
Tested-by: Vladimir Zapolskiy <vladimir_zapolskiy@mentor.com>
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Reviewed-by: Vladimir Zapolskiy <vladimir_zapolskiy@mentor.com>
Acked-by: Joao Pinto <jpinto@synopsys.com>
Acked-by: Jingoo Han <jingoohan1@gmail.com>
CC: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Diffstat (limited to 'drivers/pci/host/pcie-iproc-platform.c')
-rw-r--r-- | drivers/pci/host/pcie-iproc-platform.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/pci/host/pcie-iproc-platform.c b/drivers/pci/host/pcie-iproc-platform.c index cec0130326c9..99c2022813e4 100644 --- a/drivers/pci/host/pcie-iproc-platform.c +++ b/drivers/pci/host/pcie-iproc-platform.c @@ -99,7 +99,7 @@ static int iproc_pcie_pltfm_probe(struct platform_device *pdev) pcie->phy = NULL; } - ret = of_pci_get_host_bridge_resources(dev, 0, 0xff, &resources, + ret = devm_of_pci_get_host_bridge_resources(dev, 0, 0xff, &resources, &iobase); if (ret) { dev_err(dev, "unable to get PCI host bridge resources\n"); |