All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v1 1/3] drm/tegra: dc: Use devm_platform_ioremap_resource
@ 2020-03-08 22:38 ` Dmitry Osipenko
  0 siblings, 0 replies; 10+ messages in thread
From: Dmitry Osipenko @ 2020-03-08 22:38 UTC (permalink / raw)
  To: Thierry Reding
  Cc: dri-devel-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW,
	linux-tegra-u79uwXL29TY76Z2rM5mHXA

The devm_platform_ioremap_resource() helper replaces few lines of a
boilerplate code with a single line, making code to look cleaner a tad.

Signed-off-by: Dmitry Osipenko <digetx-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
---
 drivers/gpu/drm/tegra/dc.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/gpu/drm/tegra/dc.c b/drivers/gpu/drm/tegra/dc.c
index 7c70fd31a4c2..257163dda301 100644
--- a/drivers/gpu/drm/tegra/dc.c
+++ b/drivers/gpu/drm/tegra/dc.c
@@ -2503,7 +2503,6 @@ static int tegra_dc_couple(struct tegra_dc *dc)
 
 static int tegra_dc_probe(struct platform_device *pdev)
 {
-	struct resource *regs;
 	struct tegra_dc *dc;
 	int err;
 
@@ -2560,8 +2559,7 @@ static int tegra_dc_probe(struct platform_device *pdev)
 		tegra_powergate_power_off(dc->powergate);
 	}
 
-	regs = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-	dc->regs = devm_ioremap_resource(&pdev->dev, regs);
+	dc->regs = devm_platform_ioremap_resource(pdev, 0);
 	if (IS_ERR(dc->regs))
 		return PTR_ERR(dc->regs);
 
-- 
2.25.1

^ permalink raw reply related	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2020-03-13  8:00 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-03-08 22:38 [PATCH v1 1/3] drm/tegra: dc: Use devm_platform_ioremap_resource Dmitry Osipenko
2020-03-08 22:38 ` Dmitry Osipenko
     [not found] ` <20200308223809.23549-1-digetx-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2020-03-08 22:38   ` [PATCH v1 2/3] drm/tegra: dc: Release PM and RGB output when client's registration fails Dmitry Osipenko
2020-03-08 22:38     ` Dmitry Osipenko
2020-03-08 22:38   ` [PATCH v1 3/3] drm/tegra: dc: Silence RGB output deferred-probe error Dmitry Osipenko
2020-03-08 22:38     ` Dmitry Osipenko
     [not found]     ` <20200308223809.23549-3-digetx-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2020-03-12  9:33       ` Thierry Reding
2020-03-12  9:33         ` Thierry Reding
2020-03-12 14:03         ` Dmitry Osipenko
2020-03-12 14:03           ` Dmitry Osipenko

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.