diff mbox

drm/bridge: sti_dvo: adapt to updated bridge API

Message ID 1422522870-25693-1-git-send-email-ajaykumar.rs@samsung.com (mailing list archive)
State Accepted
Headers show

Commit Message

Ajay Kumar Jan. 29, 2015, 9:14 a.m. UTC
Commits 8eb17f05bc1802b50f8b536406357b87f63cf61d
("drm/bridge: do not pass drm_bridge_funcs to drm_bridge_init") and
("drm/bridge: make bridge registration independent of drm flow")
changed the bridge API without taking into account sti_dvo bridge
which caused the following build breakage on linux-next:

drivers/gpu/drm/sti/sti_dvo.c: In function ‘sti_dvo_brigde_destroy’:
drivers/gpu/drm/sti/sti_dvo.c:277:2: error: implicit declaration of function ‘drm_bridge_cleanup’
drivers/gpu/drm/sti/sti_dvo.c: At top level:
drivers/gpu/drm/sti/sti_dvo.c:287:2: error: unknown field ‘destroy’ specified in initializer
drivers/gpu/drm/sti/sti_dvo.c: In function ‘sti_dvo_bind’:
drivers/gpu/drm/sti/sti_dvo.c:419:2: error: implicit declaration of function ‘drm_bridge_init’

Make the necessary changes to sti_dvo bridge in order to fix the build breakage.

Signed-off-by: Ajay Kumar <ajaykumar.rs@samsung.com>
This patch contains the minimal changes needed instead of having this:

 drivers/gpu/drm/sti/sti_dvo.c |   11 ++---------
 1 file changed, 2 insertions(+), 9 deletions(-)
diff mbox


diff --git a/drivers/gpu/drm/sti/sti_dvo.c b/drivers/gpu/drm/sti/sti_dvo.c
index 651afad..1088fc5 100644
--- a/drivers/gpu/drm/sti/sti_dvo.c
+++ b/drivers/gpu/drm/sti/sti_dvo.c
@@ -272,19 +272,12 @@  static void sti_dvo_bridge_nope(struct drm_bridge *bridge)
 	/* do nothing */
-static void sti_dvo_brigde_destroy(struct drm_bridge *bridge)
-	drm_bridge_cleanup(bridge);
-	kfree(bridge);
 static const struct drm_bridge_funcs sti_dvo_bridge_funcs = {
 	.pre_enable = sti_dvo_pre_enable,
 	.enable = sti_dvo_bridge_nope,
 	.disable = sti_dvo_disable,
 	.post_disable = sti_dvo_bridge_nope,
 	.mode_set = sti_dvo_set_mode,
-	.destroy = sti_dvo_brigde_destroy,
 static int sti_dvo_connector_get_modes(struct drm_connector *connector)
@@ -416,7 +409,8 @@  static int sti_dvo_bind(struct device *dev, struct device *master, void *data)
 		return -ENOMEM;
 	bridge->driver_private = dvo;
-	drm_bridge_init(drm_dev, bridge, &sti_dvo_bridge_funcs);
+	bridge->funcs = &sti_dvo_bridge_funcs;
+	drm_bridge_attach(drm_dev, bridge);
 	encoder->bridge = bridge;
 	connector->encoder = encoder;
@@ -446,7 +440,6 @@  static int sti_dvo_bind(struct device *dev, struct device *master, void *data)
-	drm_bridge_cleanup(bridge);
 	return -EINVAL;