summaryrefslogtreecommitdiffstats
path: root/drivers/edac
diff options
context:
space:
mode:
authorYangtao Li <frank.li@vivo.com>2023-07-04 12:18:08 +0200
committerBorislav Petkov (AMD) <bp@alien8.de>2024-01-23 14:32:41 +0100
commitb57c1a1e7effab067a65bab54c5d83a67cffd043 (patch)
tree01b2baa04e21a1117fe73f4b7d6b1f6d2b0504ca /drivers/edac
parentLinux 6.8-rc1 (diff)
downloadlinux-b57c1a1e7effab067a65bab54c5d83a67cffd043.tar.xz
linux-b57c1a1e7effab067a65bab54c5d83a67cffd043.zip
EDAC/synopsys: Convert to devm_platform_ioremap_resource()
Use devm_platform_ioremap_resource() to simplify code. Signed-off-by: Yangtao Li <frank.li@vivo.com> Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de> Reviewed-by: Michal Simek <michal.simek@amd.com> Link: https://lore.kernel.org/r/20230704101811.49637-3-frank.li@vivo.com
Diffstat (limited to 'drivers/edac')
-rw-r--r--drivers/edac/synopsys_edac.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/edac/synopsys_edac.c b/drivers/edac/synopsys_edac.c
index 709babce43ba..5527055b0964 100644
--- a/drivers/edac/synopsys_edac.c
+++ b/drivers/edac/synopsys_edac.c
@@ -1324,11 +1324,9 @@ static int mc_probe(struct platform_device *pdev)
struct synps_edac_priv *priv;
struct mem_ctl_info *mci;
void __iomem *baseaddr;
- struct resource *res;
int rc;
- res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
- baseaddr = devm_ioremap_resource(&pdev->dev, res);
+ baseaddr = devm_platform_ioremap_resource(pdev, 0);
if (IS_ERR(baseaddr))
return PTR_ERR(baseaddr);