[PATCH net-next] net: ethernet: ti: am65-cpts: Use devm_platform_ioremap_resource_byname()

Subsystems: networking drivers, the rest

STALE1894d

2 messages, 2 authors, 2021-06-09 · open the first message on its own page

[PATCH net-next] net: ethernet: ti: am65-cpts: Use devm_platform_ioremap_resource_byname()

From: Yang Yingliang <hidden>
Date: 2021-06-09 13:41:41

Use the devm_platform_ioremap_resource_byname() helper instead of
calling platform_get_resource_byname() and devm_ioremap_resource()
separately.

Signed-off-by: Yang Yingliang <redacted>
---
 drivers/net/ethernet/ti/am65-cpts.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/net/ethernet/ti/am65-cpts.c b/drivers/net/ethernet/ti/am65-cpts.c
index 9caaae79fc95..c30a6e510aa3 100644
--- a/drivers/net/ethernet/ti/am65-cpts.c
+++ b/drivers/net/ethernet/ti/am65-cpts.c
@@ -1037,11 +1037,9 @@ static int am65_cpts_probe(struct platform_device *pdev)
 	struct device_node *node = pdev->dev.of_node;
 	struct device *dev = &pdev->dev;
 	struct am65_cpts *cpts;
-	struct resource *res;
 	void __iomem *base;
 
-	res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "cpts");
-	base = devm_ioremap_resource(dev, res);
+	base = devm_platform_ioremap_resource_byname(pdev, "cpts");
 	if (IS_ERR(base))
 		return PTR_ERR(base);
 
-- 
2.25.1

Re: [PATCH net-next] net: ethernet: ti: am65-cpts: Use devm_platform_ioremap_resource_byname()

From: patchwork-bot+netdevbpf@kernel.org
Date: 2021-06-09 22:30:19

Hello:

This patch was applied to netdev/net-next.git (refs/heads/master):

On Wed, 9 Jun 2021 21:45:37 +0800 you wrote:
Use the devm_platform_ioremap_resource_byname() helper instead of
calling platform_get_resource_byname() and devm_ioremap_resource()
separately.

Signed-off-by: Yang Yingliang <redacted>
---
 drivers/net/ethernet/ti/am65-cpts.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
Here is the summary with links:
  - [net-next] net: ethernet: ti: am65-cpts: Use devm_platform_ioremap_resource_byname()
    https://git.kernel.org/netdev/net-next/c/e77e2cf4a198

You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help