[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20191210203149.7115-2-tiny.windzz@gmail.com>
Date: Tue, 10 Dec 2019 20:31:46 +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 1/5] nvmem: sunxi_sid: 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/sunxi_sid.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/nvmem/sunxi_sid.c b/drivers/nvmem/sunxi_sid.c
index e26ef1bbf198..c54adf60b155 100644
--- a/drivers/nvmem/sunxi_sid.c
+++ b/drivers/nvmem/sunxi_sid.c
@@ -112,7 +112,6 @@ static int sun8i_sid_read_by_reg(void *context, unsigned int offset,
static int sunxi_sid_probe(struct platform_device *pdev)
{
struct device *dev = &pdev->dev;
- struct resource *res;
struct nvmem_config *nvmem_cfg;
struct nvmem_device *nvmem;
struct sunxi_sid *sid;
@@ -129,8 +128,7 @@ static int sunxi_sid_probe(struct platform_device *pdev)
return -EINVAL;
sid->value_offset = cfg->value_offset;
- res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
- sid->base = devm_ioremap_resource(dev, res);
+ sid->base = devm_platform_ioremap_resource(pdev, 0);
if (IS_ERR(sid->base))
return PTR_ERR(sid->base);
--
2.17.1
Powered by blists - more mailing lists