[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <202211220944121776425@zte.com.cn>
Date: Tue, 22 Nov 2022 09:44:12 +0800 (CST)
From: <ye.xingchen@....com.cn>
To: <agross@...nel.org>
Cc: <andersson@...nel.org>, <konrad.dybcio@...ainline.org>,
<broonie@...nel.org>, <linux-arm-msm@...r.kernel.org>,
<linux-spi@...r.kernel.org>, <linux-kernel@...r.kernel.org>,
<chi.minghao@....com.cn>
Subject: [PATCH] spi: 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/spi/spi-qup.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/spi/spi-qup.c b/drivers/spi/spi-qup.c
index 678dc51ef017..71fc65e094e7 100644
--- a/drivers/spi/spi-qup.c
+++ b/drivers/spi/spi-qup.c
@@ -1003,8 +1003,7 @@ static int spi_qup_probe(struct platform_device *pdev)
int ret, irq, size;
dev = &pdev->dev;
- res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
- base = devm_ioremap_resource(dev, res);
+ base = devm_platform_get_and_ioremap_resource(pdev, 0, &res);
if (IS_ERR(base))
return PTR_ERR(base);
--
2.25.1
Powered by blists - more mailing lists