[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20191210203149.7115-4-tiny.windzz@gmail.com>
Date: Tue, 10 Dec 2019 20:31:48 +0000
From: Yangtao Li <tiny.windzz@...il.com>
To: gregkh@...uxfoundation.org, rafael@...nel.org,
srinivas.kandagatla@...aro.org, vz@...ia.com, khilman@...libre.com,
mripard@...nel.org, wens@...e.org,
andriy.shevchenko@...ux.intel.com, mchehab+samsung@...nel.org,
mans@...sr.com, treding@...dia.com, suzuki.poulose@....com,
bgolaszewski@...libre.com, tglx@...utronix.de
Cc: linux-kernel@...r.kernel.org, linux-arm-kernel@...ts.infradead.org,
linux-amlogic@...ts.infradead.org,
Yangtao Li <tiny.windzz@...il.com>
Subject: [PATCH 3/5] nvmem: meson-mx-efuse: convert to devm_platform_ioremap_resource
Use devm_platform_ioremap_resource() to simplify code.
Signed-off-by: Yangtao Li <tiny.windzz@...il.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 07c9f38c1c60..24c6e8b15987 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.17.1
Powered by blists - more mailing lists