[<prev] [next>] [day] [month] [year] [list]
Message-ID: <50adb1d3-93fc-44c1-9988-02036911ee46@web.de>
Date: Sat, 21 Sep 2019 21:03:57 +0200
From: Markus Elfring <Markus.Elfring@....de>
To: dri-devel@...ts.freedesktop.org, linux-tegra@...r.kernel.org,
Arto Merilainen <amerilainen@...dia.com>,
Daniel Vetter <daniel@...ll.ch>,
David Airlie <airlied@...ux.ie>,
Jonathan Hunter <jonathanh@...dia.com>,
Thierry Reding <thierry.reding@...il.com>
Cc: LKML <linux-kernel@...r.kernel.org>,
kernel-janitors@...r.kernel.org, Andrew Chew <achew@...dia.com>,
Mikko Perttunen <mperttunen@...dia.com>
Subject: [PATCH] drm/tegra: vic: Use devm_platform_ioremap_resource() in
vic_probe()
From: Markus Elfring <elfring@...rs.sourceforge.net>
Date: Sat, 21 Sep 2019 20:51:52 +0200
Simplify this function implementation by using a known wrapper function.
This issue was detected by using the Coccinelle software.
Signed-off-by: Markus Elfring <elfring@...rs.sourceforge.net>
---
drivers/gpu/drm/tegra/vic.c | 9 +--------
1 file changed, 1 insertion(+), 8 deletions(-)
diff --git a/drivers/gpu/drm/tegra/vic.c b/drivers/gpu/drm/tegra/vic.c
index cd0399fd8c63..bc72d326588b 100644
--- a/drivers/gpu/drm/tegra/vic.c
+++ b/drivers/gpu/drm/tegra/vic.c
@@ -370,7 +370,6 @@ static int vic_probe(struct platform_device *pdev)
{
struct device *dev = &pdev->dev;
struct host1x_syncpt **syncpts;
- struct resource *regs;
struct vic *vic;
int err;
@@ -384,13 +383,7 @@ static int vic_probe(struct platform_device *pdev)
if (!syncpts)
return -ENOMEM;
- regs = platform_get_resource(pdev, IORESOURCE_MEM, 0);
- if (!regs) {
- dev_err(&pdev->dev, "failed to get registers\n");
- return -ENXIO;
- }
-
- vic->regs = devm_ioremap_resource(dev, regs);
+ vic->regs = devm_platform_ioremap_resource(pdev, 0);
if (IS_ERR(vic->regs))
return PTR_ERR(vic->regs);
--
2.23.0
Powered by blists - more mailing lists