From: Tomi Valkeinen Date: Thu, 16 Oct 2014 09:19:37 +0000 (+0300) Subject: OMAPFB: fix releasing overlays X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=13a0c40a49380752d8fbe1ff27009df2b5c71fcf;p=linux-beck.git 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 --- diff --git a/drivers/video/fbdev/omap2/omapfb/omapfb-main.c b/drivers/video/fbdev/omap2/omapfb/omapfb-main.c index a04096a63cb1..ce8a70570756 100644 --- a/drivers/video/fbdev/omap2/omapfb/omapfb-main.c +++ b/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]; ovl->disable(ovl); + + if (ovl->manager) + ovl->unset_manager(ovl); } for (i = 0; i < fbdev->num_fbs; i++)