[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <202211220935338446115@zte.com.cn>
Date: Tue, 22 Nov 2022 09:35:33 +0800 (CST)
From: <ye.xingchen@....com.cn>
To: <lars@...afoo.de>
Cc: <michael.hennerich@...log.com>, <jic23@...nel.org>,
<linux-iio@...r.kernel.org>, <linux-kernel@...r.kernel.org>,
<chi.minghao@....com.cn>
Subject: [PATCH] iio: use devm_platform_get_and_ioremap_resource()
From: Minghao Chi <chi.minghao@....com.cn>
Convert platform_get_resource(), devm_ioremap_resource() to a single
call to devm_platform_get_and_ioremap_resource(), as this is exactly
what this function does.
Signed-off-by: Minghao Chi <chi.minghao@....com.cn>
Signed-off-by: ye xingchen <ye.xingchen@....com.cn>
---
drivers/iio/adc/ad7606_par.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/iio/adc/ad7606_par.c b/drivers/iio/adc/ad7606_par.c
index b912b4df9b56..d8408052262e 100644
--- a/drivers/iio/adc/ad7606_par.c
+++ b/drivers/iio/adc/ad7606_par.c
@@ -57,8 +57,7 @@ static int ad7606_par_probe(struct platform_device *pdev)
if (irq < 0)
return irq;
- res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
- addr = devm_ioremap_resource(&pdev->dev, res);
+ addr = devm_platform_get_and_ioremap_resource(pdev, 0, &res);
if (IS_ERR(addr))
return PTR_ERR(addr);
--
2.25.1
Powered by blists - more mailing lists