diff mbox series

[v3,34/35] drm/sti: Use drm_bridge_init()

Message ID 20191224173408.25624-35-mihail.atanassov@arm.com (mailing list archive)
State New, archived
Headers show
Series drm/bridge: Consolidate initialization | expand

Commit Message

Mihail Atanassov Dec. 24, 2019, 5:34 p.m. UTC
No functional change.

v3:
 - drop driver_private argument (Laurent)
v2:
 - Also apply drm_bridge_init() in sti_hdmi.c and sti_hda.c (Sam,
   Benjamin)

Reviewed-by: Benjamin Gaignard <benjamin.gaignard@linaro.org>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mihail Atanassov <mihail.atanassov@arm.com>
---
 drivers/gpu/drm/sti/sti_dvo.c  | 3 +--
 drivers/gpu/drm/sti/sti_hda.c  | 2 +-
 drivers/gpu/drm/sti/sti_hdmi.c | 2 +-
 3 files changed, 3 insertions(+), 4 deletions(-)
diff mbox series

Patch

diff --git a/drivers/gpu/drm/sti/sti_dvo.c b/drivers/gpu/drm/sti/sti_dvo.c
index 194491231de2..a72f4e4e60cd 100644
--- a/drivers/gpu/drm/sti/sti_dvo.c
+++ b/drivers/gpu/drm/sti/sti_dvo.c
@@ -460,8 +460,7 @@  static int sti_dvo_bind(struct device *dev, struct device *master, void *data)
 
 	connector->dvo = dvo;
 
-	bridge->funcs = &sti_dvo_bridge_funcs;
-	bridge->of_node = dvo->dev.of_node;
+	drm_bridge_init(bridge, &dvo->dev, &sti_dvo_bridge_funcs, NULL);
 	drm_bridge_add(bridge);
 
 	err = drm_bridge_attach(encoder, bridge, NULL);
diff --git a/drivers/gpu/drm/sti/sti_hda.c b/drivers/gpu/drm/sti/sti_hda.c
index d5b569ce93d0..b94044eb4672 100644
--- a/drivers/gpu/drm/sti/sti_hda.c
+++ b/drivers/gpu/drm/sti/sti_hda.c
@@ -699,7 +699,7 @@  static int sti_hda_bind(struct device *dev, struct device *master, void *data)
 
 	connector->hda = hda;
 
-	bridge->funcs = &sti_hda_bridge_funcs;
+	drm_bridge_init(bridge, dev, &sti_hda_bridge_funcs, NULL);
 	drm_bridge_attach(encoder, bridge, NULL);
 
 	connector->encoder = encoder;
diff --git a/drivers/gpu/drm/sti/sti_hdmi.c b/drivers/gpu/drm/sti/sti_hdmi.c
index 7a7b0ce7bb14..e9e5c71b7eac 100644
--- a/drivers/gpu/drm/sti/sti_hdmi.c
+++ b/drivers/gpu/drm/sti/sti_hdmi.c
@@ -1275,7 +1275,7 @@  static int sti_hdmi_bind(struct device *dev, struct device *master, void *data)
 
 	connector->hdmi = hdmi;
 
-	bridge->funcs = &sti_hdmi_bridge_funcs;
+	drm_bridge_init(bridge, dev, &sti_hdmi_bridge_funcs, NULL);
 	drm_bridge_attach(encoder, bridge, NULL);
 
 	connector->encoder = encoder;