[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20230704101811.49637-4-frank.li@vivo.com>
Date: Tue, 4 Jul 2023 18:18:09 +0800
From: Yangtao Li <frank.li@...o.com>
To: Tero Kristo <kristo@...nel.org>, 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 4/5] EDAC/ti: 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/ti_edac.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/edac/ti_edac.c b/drivers/edac/ti_edac.c
index 6971ded598de..deec2d045e8c 100644
--- a/drivers/edac/ti_edac.c
+++ b/drivers/edac/ti_edac.c
@@ -231,7 +231,6 @@ static int ti_edac_probe(struct platform_device *pdev)
{
int error_irq = 0, ret = -ENODEV;
struct device *dev = &pdev->dev;
- struct resource *res;
void __iomem *reg;
struct mem_ctl_info *mci;
struct edac_mc_layer layers[1];
@@ -243,8 +242,7 @@ static int ti_edac_probe(struct platform_device *pdev)
if (!id)
return -ENODEV;
- res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
- reg = devm_ioremap_resource(dev, res);
+ reg = devm_platform_ioremap_resource(pdev, 0);
if (IS_ERR(reg))
return PTR_ERR(reg);
--
2.39.0
Powered by blists - more mailing lists