diff options
author | Tomi Valkeinen <tomi.valkeinen@ti.com> | 2012-10-24 02:20:40 -0400 |
---|---|---|
committer | Tomi Valkeinen <tomi.valkeinen@ti.com> | 2012-10-29 06:44:43 -0400 |
commit | 4c6c65b013a20054585dfca5cfbf3a2f6393ab50 (patch) | |
tree | 2416dcb9bcf12d43540d438a4f3b6467d2ee3e70 /drivers/video | |
parent | 901e5fe5a47d360a8ad6b5fbbe37e107ddb11662 (diff) |
OMAPDSS: DISPC: fix loop in error handler
The dispc's error handler has a loop inside another loop, and both use
the same loop variable. This is clearly wrong, and this patch makes a
new variable for the inner loop.
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Diffstat (limited to 'drivers/video')
-rw-r--r-- | drivers/video/omap2/dss/dispc.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/video/omap2/dss/dispc.c b/drivers/video/omap2/dss/dispc.c index d2948732843..070ce306da1 100644 --- a/drivers/video/omap2/dss/dispc.c +++ b/drivers/video/omap2/dss/dispc.c | |||
@@ -3901,6 +3901,7 @@ static void dispc_error_worker(struct work_struct *work) | |||
3901 | bit = mgr_desc[i].sync_lost_irq; | 3901 | bit = mgr_desc[i].sync_lost_irq; |
3902 | 3902 | ||
3903 | if (bit & errors) { | 3903 | if (bit & errors) { |
3904 | int j; | ||
3904 | struct omap_dss_device *dssdev = mgr->get_device(mgr); | 3905 | struct omap_dss_device *dssdev = mgr->get_device(mgr); |
3905 | bool enable; | 3906 | bool enable; |
3906 | 3907 | ||
@@ -3911,9 +3912,9 @@ static void dispc_error_worker(struct work_struct *work) | |||
3911 | enable = dssdev->state == OMAP_DSS_DISPLAY_ACTIVE; | 3912 | enable = dssdev->state == OMAP_DSS_DISPLAY_ACTIVE; |
3912 | dssdev->driver->disable(dssdev); | 3913 | dssdev->driver->disable(dssdev); |
3913 | 3914 | ||
3914 | for (i = 0; i < omap_dss_get_num_overlays(); ++i) { | 3915 | for (j = 0; j < omap_dss_get_num_overlays(); ++j) { |
3915 | struct omap_overlay *ovl; | 3916 | struct omap_overlay *ovl; |
3916 | ovl = omap_dss_get_overlay(i); | 3917 | ovl = omap_dss_get_overlay(j); |
3917 | 3918 | ||
3918 | if (ovl->id != OMAP_DSS_GFX && | 3919 | if (ovl->id != OMAP_DSS_GFX && |
3919 | ovl->manager == mgr) | 3920 | ovl->manager == mgr) |