summaryrefslogtreecommitdiff
path: root/drivers/video/omap2/omapfb/omapfb-main.c
diff options
context:
space:
mode:
authorArchit Taneja <archit@ti.com>2012-07-20 12:56:56 (GMT)
committerTomi Valkeinen <tomi.valkeinen@ti.com>2012-09-26 11:58:32 (GMT)
commit4249e61e0440f01d279fa21d121dbf069e6620fa (patch)
tree4744bd17c3b1aa5bdb352f912fb6145074883761 /drivers/video/omap2/omapfb/omapfb-main.c
parentd629f03f748c46277c421ed5b892f0b39fd1fe47 (diff)
downloadlinux-fsl-qoriq-4249e61e0440f01d279fa21d121dbf069e6620fa.tar.xz
OMAPFB: remove manager->device references
With the introduction of output entities, managers will now connect to outputs. Use the helper op for overlays named get_device. This will abstract away the information on how to get the device from an overlay. 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>
Diffstat (limited to 'drivers/video/omap2/omapfb/omapfb-main.c')
-rw-r--r--drivers/video/omap2/omapfb/omapfb-main.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/video/omap2/omapfb/omapfb-main.c b/drivers/video/omap2/omapfb/omapfb-main.c
index 77ae9ed..b103793 100644
--- a/drivers/video/omap2/omapfb/omapfb-main.c
+++ b/drivers/video/omap2/omapfb/omapfb-main.c
@@ -2379,6 +2379,7 @@ static int __init omapfb_probe(struct platform_device *pdev)
struct omap_overlay *ovl;
struct omap_dss_device *def_display;
struct omap_dss_device *dssdev;
+ struct omap_dss_device *ovl_device;
DBG("omapfb_probe\n");
@@ -2452,8 +2453,9 @@ static int __init omapfb_probe(struct platform_device *pdev)
/* gfx overlay should be the default one. find a display
* connected to that, and use it as default display */
ovl = omap_dss_get_overlay(0);
- if (ovl->manager && ovl->manager->device) {
- def_display = ovl->manager->device;
+ ovl_device = ovl->get_device(ovl);
+ if (ovl_device) {
+ def_display = ovl_device;
} else {
dev_warn(&pdev->dev, "cannot find default display\n");
def_display = NULL;