Skip to content

Commit 188f46c

Browse files
Yang Likwilczynski
authored andcommitted
PCI: imx6: Use devm_platform_get_and_ioremap_resource()
Convert calls to platform_get_resource() and devm_ioremap_resource() into a single call to devm_platform_get_and_ioremap_resource(), to simplify the code. This new helper added in commit 890cc39 ("drivers: provide devm_platform_get_and_ioremap_resource()") does what both of the other separate functions do. [kwilczynski: commit log] Link: https://lore.kernel.org/linux-pci/20230323074553.90372-1-yang.lee@linux.alibaba.com Signed-off-by: Yang Li <yang.lee@linux.alibaba.com> Signed-off-by: Krzysztof Wilczyński <kwilczynski@kernel.org> Reviewed-by: Richard Zhu <hongxing.zhu@nxp.com>
1 parent b1042a7 commit 188f46c

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

drivers/pci/controller/dwc/pci-imx6.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1282,8 +1282,7 @@ static int imx6_pcie_probe(struct platform_device *pdev)
12821282
return PTR_ERR(imx6_pcie->phy_base);
12831283
}
12841284

1285-
dbi_base = platform_get_resource(pdev, IORESOURCE_MEM, 0);
1286-
pci->dbi_base = devm_ioremap_resource(dev, dbi_base);
1285+
pci->dbi_base = devm_platform_get_and_ioremap_resource(pdev, 0, &dbi_base);
12871286
if (IS_ERR(pci->dbi_base))
12881287
return PTR_ERR(pci->dbi_base);
12891288

0 commit comments

Comments
 (0)