aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/pci/controller/pcie-brcmstb.c
diff options
context:
space:
mode:
authorDejin Zheng <[email protected]>2020-07-08 15:56:14 +0000
committerLorenzo Pieralisi <[email protected]>2020-07-10 10:50:23 +0000
commit3cf0eead9fb895dd91fc1fea0114ca0068d1c1a3 (patch)
tree107aec946adce5e80924a180d1cb3566777d2de8 /drivers/pci/controller/pcie-brcmstb.c
parentPCI: controller: Convert to devm_platform_ioremap_resource_byname() (diff)
downloadkernel-3cf0eead9fb895dd91fc1fea0114ca0068d1c1a3.tar.gz
kernel-3cf0eead9fb895dd91fc1fea0114ca0068d1c1a3.zip
PCI: controller: Convert to devm_platform_ioremap_resource()
Use devm_platform_ioremap_resource() to simplify the code, since t contains platform_get_resource() and devm_ioremap_resource() calls respectively. Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Dejin Zheng <[email protected]> Signed-off-by: Lorenzo Pieralisi <[email protected]> Reviewed-by: Rob Herring <[email protected]>
Diffstat (limited to 'drivers/pci/controller/pcie-brcmstb.c')
-rw-r--r--drivers/pci/controller/pcie-brcmstb.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/pci/controller/pcie-brcmstb.c b/drivers/pci/controller/pcie-brcmstb.c
index 15c747c1390a..91a4b7f3ee45 100644
--- a/drivers/pci/controller/pcie-brcmstb.c
+++ b/drivers/pci/controller/pcie-brcmstb.c
@@ -933,7 +933,6 @@ static int brcm_pcie_probe(struct platform_device *pdev)
struct pci_host_bridge *bridge;
struct device_node *fw_np;
struct brcm_pcie *pcie;
- struct resource *res;
int ret;
/*
@@ -958,8 +957,7 @@ static int brcm_pcie_probe(struct platform_device *pdev)
pcie->dev = &pdev->dev;
pcie->np = np;
- res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
- pcie->base = devm_ioremap_resource(&pdev->dev, res);
+ pcie->base = devm_platform_ioremap_resource(pdev, 0);
if (IS_ERR(pcie->base))
return PTR_ERR(pcie->base);