From 67ab3379d247fa2e0cf772b9f06c3265b3a64639 Mon Sep 17 00:00:00 2001 From: Tomi Valkeinen Date: Thu, 13 Dec 2012 12:17:08 +0200 Subject: [PATCH] --- yaml --- r: 344700 b: refs/heads/master c: c7e1eae537652330cec3fbf5f8f50000b2f24269 h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/drivers/video/omap2/omapfb/omapfb.h | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/[refs] b/[refs] index d0269619f58f..76241bc84f3c 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: fa0c5e71295fa4d62b900818d900c16980985e72 +refs/heads/master: c7e1eae537652330cec3fbf5f8f50000b2f24269 diff --git a/trunk/drivers/video/omap2/omapfb/omapfb.h b/trunk/drivers/video/omap2/omapfb/omapfb.h index 71cd8bab31c0..2b5264475ed4 100644 --- a/trunk/drivers/video/omap2/omapfb/omapfb.h +++ b/trunk/drivers/video/omap2/omapfb/omapfb.h @@ -144,16 +144,16 @@ int omapfb_set_update_mode(struct fb_info *fbi, enum omapfb_update_mode mode); static inline struct omap_dss_device *fb2display(struct fb_info *fbi) { struct omapfb_info *ofbi = FB2OFB(fbi); - int i; + struct omap_overlay *ovl; /* XXX: returns the display connected to first attached overlay */ - for (i = 0; i < ofbi->num_overlays; i++) { - struct omap_overlay *ovl = ofbi->overlays[i]; - return ovl->get_device(ovl); - } + if (ofbi->num_overlays == 0) + return NULL; - return NULL; + ovl = ofbi->overlays[0]; + + return ovl->get_device(ovl); } static inline struct omapfb_display_data *get_display_data(