[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250401194006848hzqFNLT61SYyidkSwwH4C@zte.com.cn>
Date: Tue, 1 Apr 2025 19:40:06 +0800 (CST)
From: <shao.mingyin@....com.cn>
To: <miquel.raynal@...tlin.com>, <jckuo@...dia.com>
Cc: <vkoul@...nel.org>, <kishon@...nel.org>, <linux-phy@...ts.infradead.org>,
<linux-kernel@...r.kernel.org>, <thierry.reding@...il.com>,
<jonathanh@...dia.com>, <linux-tegra@...r.kernel.org>,
<yang.yang29@....com.cn>, <xu.xin16@....com.cn>,
<ye.xingchen@....com.cn>, <xie.ludan@....com.cn>
Subject: [PATCH 2/2] phy: tegra: xusb: Use devm_platform_ioremap_resource_byname
From: Xie Ludan <xie.ludan@....com.cn>
Introduce devm_platform_ioremap_resource_byname() to simplify resource
retrieval and mapping.This new function consolidates
platform_get_resource_byname() and devm_ioremap_resource() into
a single call, improving code readability and reducing API call overhead.
Signed-off-by: Xie Ludan <xie.ludan@....com.cn>
Signed-off-by: Shao Mingyin <shao.mingyin@....com.cn>
---
drivers/phy/tegra/xusb-tegra186.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/phy/tegra/xusb-tegra186.c b/drivers/phy/tegra/xusb-tegra186.c
index fae6242aa730..6586472866e2 100644
--- a/drivers/phy/tegra/xusb-tegra186.c
+++ b/drivers/phy/tegra/xusb-tegra186.c
@@ -1485,7 +1485,6 @@ tegra186_xusb_padctl_probe(struct device *dev,
{
struct platform_device *pdev = to_platform_device(dev);
struct tegra186_xusb_padctl *priv;
- struct resource *res;
int err;
priv = devm_kzalloc(dev, sizeof(*priv), GFP_KERNEL);
@@ -1495,8 +1494,7 @@ tegra186_xusb_padctl_probe(struct device *dev,
priv->base.dev = dev;
priv->base.soc = soc;
- res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "ao");
- priv->ao_regs = devm_ioremap_resource(dev, res);
+ priv->ao_regs = devm_platform_ioremap_resource_byname(pdev, "ao");
if (IS_ERR(priv->ao_regs))
return ERR_CAST(priv->ao_regs);
--
2.25.1
Powered by blists - more mailing lists