[PATCH] drm/bridge: sti_dvo: adapt to updated bridge API

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Commits 8eb17f05bc1802b50f8b536406357b87f63cf61d
("drm/bridge: do not pass drm_bridge_funcs to drm_bridge_init") and
fbc4572e9c48e45bdfeb2ee8c8f0198b3e70c030
("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@xxxxxxxxxxx>
---
This patch contains the minimal changes needed instead of having this:
http://cgit.freedesktop.org/~airlied/linux/commit/?h=drm-next&id=384764c3611645d96889742a079168c86a6fc4c4

 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.7.9.5

--
To unsubscribe from this list: send the line "unsubscribe linux-next" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Kernel]     [Linux USB Development]     [Yosemite News]     [Linux SCSI]

  Powered by Linux