diff options
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/video/omap2/dss/apply.c | 14 | ||||
-rw-r--r-- | drivers/video/omap2/dss/output.c | 8 |
2 files changed, 20 insertions, 2 deletions
diff --git a/drivers/video/omap2/dss/apply.c b/drivers/video/omap2/dss/apply.c index 752b98592908..d6212d63cfb2 100644 --- a/drivers/video/omap2/dss/apply.c +++ b/drivers/video/omap2/dss/apply.c @@ -422,7 +422,19 @@ static void wait_pending_extra_info_updates(void) static struct omap_dss_device *dss_mgr_get_device(struct omap_overlay_manager *mgr) { - return mgr->output ? mgr->output->device : NULL; + struct omap_dss_device *dssdev; + + dssdev = mgr->output; + if (dssdev == NULL) + return NULL; + + while (dssdev->device) + dssdev = dssdev->device; + + if (dssdev->driver) + return dssdev; + else + return NULL; } static struct omap_dss_device *dss_ovl_get_device(struct omap_overlay *ovl) diff --git a/drivers/video/omap2/dss/output.c b/drivers/video/omap2/dss/output.c index 0ba168e23907..3f5c0a758b32 100644 --- a/drivers/video/omap2/dss/output.c +++ b/drivers/video/omap2/dss/output.c @@ -146,7 +146,13 @@ EXPORT_SYMBOL(omap_dss_find_output_by_node); struct omap_dss_device *omapdss_find_output_from_display(struct omap_dss_device *dssdev) { - return omap_dss_get_device(dssdev->output); + while (dssdev->output) + dssdev = dssdev->output; + + if (dssdev->id != 0) + return omap_dss_get_device(dssdev); + + return NULL; } EXPORT_SYMBOL(omapdss_find_output_from_display); |