aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/video
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/video')
-rw-r--r--drivers/video/omap2/omapfb/omapfb.h12
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/video/omap2/omapfb/omapfb.h b/drivers/video/omap2/omapfb/omapfb.h
index 71cd8bab31c0..2b5264475ed4 100644
--- a/drivers/video/omap2/omapfb/omapfb.h
+++ b/drivers/video/omap2/omapfb/omapfb.h
@@ -144,16 +144,16 @@ int omapfb_set_update_mode(struct fb_info *fbi, enum omapfb_update_mode mode);
144static inline struct omap_dss_device *fb2display(struct fb_info *fbi) 144static inline struct omap_dss_device *fb2display(struct fb_info *fbi)
145{ 145{
146 struct omapfb_info *ofbi = FB2OFB(fbi); 146 struct omapfb_info *ofbi = FB2OFB(fbi);
147 int i; 147 struct omap_overlay *ovl;
148 148
149 /* XXX: returns the display connected to first attached overlay */ 149 /* XXX: returns the display connected to first attached overlay */
150 for (i = 0; i < ofbi->num_overlays; i++) {
151 struct omap_overlay *ovl = ofbi->overlays[i];
152 150
153 return ovl->get_device(ovl); 151 if (ofbi->num_overlays == 0)
154 } 152 return NULL;
155 153
156 return NULL; 154 ovl = ofbi->overlays[0];
155
156 return ovl->get_device(ovl);
157} 157}
158 158
159static inline struct omapfb_display_data *get_display_data( 159static inline struct omapfb_display_data *get_display_data(