Commit fbc4572e9c48e45b ("drm/bridge: make bridge registration independent of
drm flow") introduced some drm/bridge API modifications. Make the necessary
changes so that we can avoid the build breakage:

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' [-Werror=implicit-function-declaration]
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' [-Werror=implicit-function-declaration]

Signed-off-by: Fabio Estevam <fabio.estevam at freescale.com>
---
 drivers/gpu/drm/sti/sti_dvo.c | 11 ++---------
 1 file changed, 2 insertions(+), 9 deletions(-)

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)
 err_sysfs:
        drm_connector_unregister(drm_connector);
 err_connector:
-       drm_bridge_cleanup(bridge);
        drm_connector_cleanup(drm_connector);
        return -EINVAL;
 }
-- 
1.9.1

Reply via email to