diff mbox series

[RFC,04/15] drm: rcar-du: dsi: Reorganize probe function

Message ID 20210623034656.10316-5-laurent.pinchart+renesas@ideasonboard.com (mailing list archive)
State New
Delegated to: Kieran Bingham
Headers show
Series R-Car V3U: DSI encoder driver | expand

Commit Message

Laurent Pinchart June 23, 2021, 3:46 a.m. UTC
Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
---
 drivers/gpu/drm/rcar-du/rcar_mipi_dsi.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)
diff mbox series

Patch

diff --git a/drivers/gpu/drm/rcar-du/rcar_mipi_dsi.c b/drivers/gpu/drm/rcar-du/rcar_mipi_dsi.c
index 0c9887557761..92cd431631bf 100644
--- a/drivers/gpu/drm/rcar-du/rcar_mipi_dsi.c
+++ b/drivers/gpu/drm/rcar-du/rcar_mipi_dsi.c
@@ -832,10 +832,7 @@  static int rcar_mipi_dsi_probe(struct platform_device *pdev)
 	if (ret < 0)
 		return ret;
 
-	/* Initialize the DRM bridge. */
-	mipi_dsi->bridge.funcs = &rcar_mipi_dsi_bridge_ops;
-	mipi_dsi->bridge.of_node = pdev->dev.of_node;
-
+	/* Acquire resources. */
 	mem = platform_get_resource(pdev, IORESOURCE_MEM, 0);
 	mipi_dsi->mmio = devm_ioremap_resource(&pdev->dev, mem);
 	if (IS_ERR(mipi_dsi->mmio))
@@ -851,13 +848,16 @@  static int rcar_mipi_dsi_probe(struct platform_device *pdev)
 		return PTR_ERR(mipi_dsi->rstc);
 	}
 
-	/* Initialize the DST host. */
+	/* Initialize the DSI host. */
 	mipi_dsi->host.dev = dev;
 	mipi_dsi->host.ops = &rcar_mipi_dsi_host_ops;
 	ret = mipi_dsi_host_register(&mipi_dsi->host);
 	if (ret < 0)
 		return ret;
 
+	/* Initialize the DRM bridge. */
+	mipi_dsi->bridge.funcs = &rcar_mipi_dsi_bridge_ops;
+	mipi_dsi->bridge.of_node = pdev->dev.of_node;
 	drm_bridge_add(&mipi_dsi->bridge);
 
 	return 0;