PCI: dwc: Convert to devm_platform_ioremap_resource_byname()
Use devm_platform_ioremap_resource_byname() to simplify the code since it contains platform_get_resource_byname() and devm_ioremap_resource() respectively. Link: https://lore.kernel.org/r/20200708164013.5076-1-zhengdejin5@gmail.com Signed-off-by: Dejin Zheng <zhengdejin5@gmail.com> Signed-off-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com> Reviewed-by: Gustavo Pimentel <gustavo.pimentel@synopsys.com> Reviewed-by: Rob Herring <robh@kernel.org>
This commit is contained in:

committed by
Lorenzo Pieralisi

parent
824001cb64
commit
936fa5cd7b
@@ -1323,8 +1323,7 @@ static int __init ks_pcie_probe(struct platform_device *pdev)
|
||||
}
|
||||
|
||||
if (pci->version >= 0x480A) {
|
||||
res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "atu");
|
||||
atu_base = devm_ioremap_resource(dev, res);
|
||||
atu_base = devm_platform_ioremap_resource_byname(pdev, "atu");
|
||||
if (IS_ERR(atu_base)) {
|
||||
ret = PTR_ERR(atu_base);
|
||||
goto err_get_sync;
|
||||
|
Reference in New Issue
Block a user