diff options
author | Archit Taneja <archit@ti.com> | 2012-07-20 18:26:56 +0530 |
---|---|---|
committer | Tomi Valkeinen <tomi.valkeinen@ti.com> | 2012-09-26 14:58:32 +0300 |
commit | 4249e61e0440f01d279fa21d121dbf069e6620fa (patch) | |
tree | 4744bd17c3b1aa5bdb352f912fb6145074883761 /drivers/video/omap2/omapfb/omapfb.h | |
parent | d629f03f748c46277c421ed5b892f0b39fd1fe47 (diff) | |
download | kernel_goldelico_gta04-4249e61e0440f01d279fa21d121dbf069e6620fa.zip kernel_goldelico_gta04-4249e61e0440f01d279fa21d121dbf069e6620fa.tar.gz kernel_goldelico_gta04-4249e61e0440f01d279fa21d121dbf069e6620fa.tar.bz2 |
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.h')
-rw-r--r-- | drivers/video/omap2/omapfb/omapfb.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/video/omap2/omapfb/omapfb.h b/drivers/video/omap2/omapfb/omapfb.h index 30361a0..5ced9b3 100644 --- a/drivers/video/omap2/omapfb/omapfb.h +++ b/drivers/video/omap2/omapfb/omapfb.h @@ -148,8 +148,9 @@ static inline struct omap_dss_device *fb2display(struct fb_info *fbi) /* XXX: returns the display connected to first attached overlay */ for (i = 0; i < ofbi->num_overlays; i++) { - if (ofbi->overlays[i]->manager) - return ofbi->overlays[i]->manager->device; + struct omap_overlay *ovl = ofbi->overlays[i]; + + return ovl->get_device(ovl); } return NULL; |