aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorArchit Taneja <archit@ti.com>2012-07-20 09:00:50 -0400
committerTomi Valkeinen <tomi.valkeinen@ti.com>2012-09-26 07:58:32 -0400
commit23e2aa644f39fbc8121f49dd50ce85590cc4e4b7 (patch)
tree300476edd9a3f81a70d86c8091f3bc4921d0824a
parent4249e61e0440f01d279fa21d121dbf069e6620fa (diff)
OMAPDRM: Remove manager->device references
With the introduction of output entities, managers will now connect to outputs. Use the helper op for managers named get_device. This will abstract away the information on how to get the device from an overlay manager. Using the helper function will reduce the number of pointer dereferences a user of OMAPDSS needs to do and reduce risk of a NULL dereference. Signed-off-by: Archit Taneja <archit@ti.com>
-rw-r--r--drivers/staging/omapdrm/omap_drv.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/staging/omapdrm/omap_drv.c b/drivers/staging/omapdrm/omap_drv.c
index 4beab9447ceb..64a354a54737 100644
--- a/drivers/staging/omapdrm/omap_drv.c
+++ b/drivers/staging/omapdrm/omap_drv.c
@@ -106,7 +106,8 @@ static void dump_video_chains(void)
106 for (i = 0; i < omap_dss_get_num_overlays(); i++) { 106 for (i = 0; i < omap_dss_get_num_overlays(); i++) {
107 struct omap_overlay *ovl = omap_dss_get_overlay(i); 107 struct omap_overlay *ovl = omap_dss_get_overlay(i);
108 struct omap_overlay_manager *mgr = ovl->manager; 108 struct omap_overlay_manager *mgr = ovl->manager;
109 struct omap_dss_device *dssdev = mgr ? mgr->device : NULL; 109 struct omap_dss_device *dssdev = mgr ?
110 mgr->get_device(mgr) : NULL;
110 if (dssdev) { 111 if (dssdev) {
111 DBG("%d: %s -> %s -> %s", i, ovl->name, mgr->name, 112 DBG("%d: %s -> %s -> %s", i, ovl->name, mgr->name,
112 dssdev->name); 113 dssdev->name);
@@ -185,7 +186,7 @@ static int create_connector(struct drm_device *dev,
185 for (j = 0; j < priv->num_encoders; j++) { 186 for (j = 0; j < priv->num_encoders; j++) {
186 struct omap_overlay_manager *mgr = 187 struct omap_overlay_manager *mgr =
187 omap_encoder_get_manager(priv->encoders[j]); 188 omap_encoder_get_manager(priv->encoders[j]);
188 if (mgr->device == dssdev) { 189 if (mgr->get_device(mgr) == dssdev) {
189 drm_mode_connector_attach_encoder(connector, 190 drm_mode_connector_attach_encoder(connector,
190 priv->encoders[j]); 191 priv->encoders[j]);
191 } 192 }