[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20230324074901.72506-1-yang.lee@linux.alibaba.com>
Date: Fri, 24 Mar 2023 15:49:01 +0800
From: Yang Li <yang.lee@...ux.alibaba.com>
To: srinivas.kandagatla@...aro.org, neil.armstrong@...aro.org,
khilman@...libre.com
Cc: jbrunet@...libre.com, martin.blumenstingl@...glemail.com,
linux-arm-kernel@...ts.infradead.org,
linux-amlogic@...ts.infradead.org, linux-kernel@...r.kernel.org,
Yang Li <yang.lee@...ux.alibaba.com>
Subject: [PATCH -next] nvmem: meson-mx-efuse: Use devm_platform_ioremap_resource()
According to commit 7945f929f1a7 ("drivers: provide
devm_platform_ioremap_resource()"), convert platform_get_resource(),
devm_ioremap_resource() to a single call to use
devm_platform_ioremap_resource(), as this is exactly what this function
does.
Signed-off-by: Yang Li <yang.lee@...ux.alibaba.com>
---
drivers/nvmem/meson-mx-efuse.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/nvmem/meson-mx-efuse.c b/drivers/nvmem/meson-mx-efuse.c
index 13eb14316f46..461e3ad87bcd 100644
--- a/drivers/nvmem/meson-mx-efuse.c
+++ b/drivers/nvmem/meson-mx-efuse.c
@@ -194,7 +194,6 @@ static int meson_mx_efuse_probe(struct platform_device *pdev)
{
const struct meson_mx_efuse_platform_data *drvdata;
struct meson_mx_efuse *efuse;
- struct resource *res;
drvdata = of_device_get_match_data(&pdev->dev);
if (!drvdata)
@@ -204,8 +203,7 @@ static int meson_mx_efuse_probe(struct platform_device *pdev)
if (!efuse)
return -ENOMEM;
- res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
- efuse->base = devm_ioremap_resource(&pdev->dev, res);
+ efuse->base = devm_platform_ioremap_resource(pdev, 0);
if (IS_ERR(efuse->base))
return PTR_ERR(efuse->base);
--
2.20.1.7.g153144c
Powered by blists - more mailing lists