[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <c2e4aaa9-731f-4a33-890e-567c466a8885@web.de>
Date: Mon, 5 Feb 2024 11:01:01 +0100
From: Markus Elfring <Markus.Elfring@....de>
To: linux-tegra@...r.kernel.org, dri-devel@...ts.freedesktop.org,
kernel-janitors@...r.kernel.org, Daniel Vetter <daniel@...ll.ch>,
David Airlie <airlied@...il.com>, Jonathan Hunter <jonathanh@...dia.com>,
Mikko Perttunen <mperttunen@...dia.com>,
Thierry Reding <thierry.reding@...il.com>
Cc: LKML <linux-kernel@...r.kernel.org>
Subject: [PATCH] drm/tegra: dsi: Use devm_platform_get_and_ioremap_resource()
in tegra_dsi_probe()
From: Markus Elfring <elfring@...rs.sourceforge.net>
Date: Mon, 5 Feb 2024 10:51:36 +0100
A wrapper function is available since the commit 890cc39a879906b63912482dfc41944579df2dc6
("drivers: provide devm_platform_get_and_ioremap_resource()").
Thus reuse existing functionality instead of keeping duplicate source code.
This issue was detected by using the Coccinelle software.
Signed-off-by: Markus Elfring <elfring@...rs.sourceforge.net>
---
drivers/gpu/drm/tegra/dsi.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/tegra/dsi.c b/drivers/gpu/drm/tegra/dsi.c
index fbfe92a816d4..727c3a7d8d26 100644
--- a/drivers/gpu/drm/tegra/dsi.c
+++ b/drivers/gpu/drm/tegra/dsi.c
@@ -1624,8 +1624,7 @@ static int tegra_dsi_probe(struct platform_device *pdev)
return err;
}
- regs = platform_get_resource(pdev, IORESOURCE_MEM, 0);
- dsi->regs = devm_ioremap_resource(&pdev->dev, regs);
+ dsi->regs = devm_platform_get_and_ioremap_resource(pdev, 0, ®s);
if (IS_ERR(dsi->regs))
return PTR_ERR(dsi->regs);
--
2.43.0
Powered by blists - more mailing lists