public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/3] DRM: ingenic: Use devm_platform_ioremap_resource
@ 2019-06-27 18:21 Paul Cercueil
  2019-06-27 18:21 ` [PATCH 2/3] DRM: ingenic: Add support for Sharp panels Paul Cercueil
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Paul Cercueil @ 2019-06-27 18:21 UTC (permalink / raw)
  To: David Airlie, Daniel Vetter
  Cc: Sam Ravnborg, dri-devel, linux-kernel, od, Paul Cercueil

Simplify a bit the probe function by using the newly introduced
devm_platform_ioremap_resource(), instead of having to call
platform_get_resource() followed by devm_ioremap_resource().

Signed-off-by: Paul Cercueil <paul@crapouillou.net>
---
 drivers/gpu/drm/ingenic/ingenic-drm.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/gpu/drm/ingenic/ingenic-drm.c b/drivers/gpu/drm/ingenic/ingenic-drm.c
index a069579ca749..02c4788ef1c7 100644
--- a/drivers/gpu/drm/ingenic/ingenic-drm.c
+++ b/drivers/gpu/drm/ingenic/ingenic-drm.c
@@ -580,7 +580,6 @@ static int ingenic_drm_probe(struct platform_device *pdev)
 	struct drm_bridge *bridge;
 	struct drm_panel *panel;
 	struct drm_device *drm;
-	struct resource *mem;
 	void __iomem *base;
 	long parent_rate;
 	int ret, irq;
@@ -614,8 +613,7 @@ static int ingenic_drm_probe(struct platform_device *pdev)
 	drm->mode_config.max_height = 600;
 	drm->mode_config.funcs = &ingenic_drm_mode_config_funcs;
 
-	mem = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-	base = devm_ioremap_resource(dev, mem);
+	base = devm_platform_ioremap_resource(pdev, 0);
 	if (IS_ERR(base)) {
 		dev_err(dev, "Failed to get memory resource");
 		return PTR_ERR(base);
-- 
2.21.0.593.g511ec345e18


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

end of thread, other threads:[~2019-06-30 20:57 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-06-27 18:21 [PATCH 1/3] DRM: ingenic: Use devm_platform_ioremap_resource Paul Cercueil
2019-06-27 18:21 ` [PATCH 2/3] DRM: ingenic: Add support for Sharp panels Paul Cercueil
2019-06-30  8:20   ` Sam Ravnborg
2019-06-27 18:21 ` [PATCH 3/3] DRM: ingenic: Add support for panels with 8-bit serial bus Paul Cercueil
2019-06-30  8:21   ` Sam Ravnborg
2019-06-30  8:18 ` [PATCH 1/3] DRM: ingenic: Use devm_platform_ioremap_resource Sam Ravnborg
2019-06-30 11:09   ` Paul Cercueil
2019-06-30 20:56     ` Sam Ravnborg

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox