Commit e77e2cf4 authored by Yang Yingliang's avatar Yang Yingliang Committed by David S. Miller

net: ethernet: ti: am65-cpts: Use devm_platform_ioremap_resource_byname()

Use the devm_platform_ioremap_resource_byname() helper instead of
calling platform_get_resource_byname() and devm_ioremap_resource()
separately.
Signed-off-by: default avatarYang Yingliang <yangyingliang@huawei.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 3a5a32b5
...@@ -1037,11 +1037,9 @@ static int am65_cpts_probe(struct platform_device *pdev) ...@@ -1037,11 +1037,9 @@ static int am65_cpts_probe(struct platform_device *pdev)
struct device_node *node = pdev->dev.of_node; struct device_node *node = pdev->dev.of_node;
struct device *dev = &pdev->dev; struct device *dev = &pdev->dev;
struct am65_cpts *cpts; struct am65_cpts *cpts;
struct resource *res;
void __iomem *base; void __iomem *base;
res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "cpts"); base = devm_platform_ioremap_resource_byname(pdev, "cpts");
base = devm_ioremap_resource(dev, res);
if (IS_ERR(base)) if (IS_ERR(base))
return PTR_ERR(base); return PTR_ERR(base);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment