[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20230704101811.49637-5-frank.li@vivo.com>
Date: Tue, 4 Jul 2023 18:18:10 +0800
From: Yangtao Li <frank.li@...o.com>
To: Khuong Dinh <khuong@...amperecomputing.com>,
Borislav Petkov <bp@...en8.de>,
Tony Luck <tony.luck@...el.com>,
James Morse <james.morse@....com>,
Mauro Carvalho Chehab <mchehab@...nel.org>,
Robert Richter <rric@...nel.org>
Cc: Yangtao Li <frank.li@...o.com>, linux-edac@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: [PATCH 5/5] EDAC/xgene: Convert to devm_platform_ioremap_resource()
Use devm_platform_ioremap_resource() to simplify code.
Signed-off-by: Yangtao Li <frank.li@...o.com>
---
drivers/edac/xgene_edac.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/edac/xgene_edac.c b/drivers/edac/xgene_edac.c
index c52b9dd9154c..5ac1a0d3495b 100644
--- a/drivers/edac/xgene_edac.c
+++ b/drivers/edac/xgene_edac.c
@@ -1845,7 +1845,6 @@ static int xgene_edac_probe(struct platform_device *pdev)
{
struct xgene_edac *edac;
struct device_node *child;
- struct resource *res;
int rc;
edac = devm_kzalloc(&pdev->dev, sizeof(*edac), GFP_KERNEL);
@@ -1903,8 +1902,7 @@ static int xgene_edac_probe(struct platform_device *pdev)
edac->rb_map = NULL;
}
- res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
- edac->pcp_csr = devm_ioremap_resource(&pdev->dev, res);
+ edac->pcp_csr = devm_platform_ioremap_resource(pdev, 0);
if (IS_ERR(edac->pcp_csr)) {
dev_err(&pdev->dev, "no PCP resource address\n");
rc = PTR_ERR(edac->pcp_csr);
--
2.39.0
Powered by blists - more mailing lists