浏览代码

OMAPFB: fix releasing overlays

omapfb disables all the overlays when freeing resources, but it should
also remove those overlays from overlay managers.

Not doing so causes a crash if omapfb is unbound and bound, or omapfb
module is removed and loaded, while keeping omapdss around.

Fix this by calling unset_manager() for all overlays.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Tomi Valkeinen 11 年之前
父节点
当前提交
13a0c40a49
共有 1 个文件被更改,包括 3 次插入0 次删除
  1. 3 0
      drivers/video/fbdev/omap2/omapfb/omapfb-main.c

+ 3 - 0
drivers/video/fbdev/omap2/omapfb/omapfb-main.c

@@ -1837,6 +1837,9 @@ static void omapfb_free_resources(struct omapfb2_device *fbdev)
 		struct omap_overlay *ovl = fbdev->overlays[i];
 		struct omap_overlay *ovl = fbdev->overlays[i];
 
 
 		ovl->disable(ovl);
 		ovl->disable(ovl);
+
+		if (ovl->manager)
+			ovl->unset_manager(ovl);
 	}
 	}
 
 
 	for (i = 0; i < fbdev->num_fbs; i++)
 	for (i = 0; i < fbdev->num_fbs; i++)