From patchwork Thu Oct 16 09:39:47 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tomi Valkeinen X-Patchwork-Id: 5089601 Return-Path: X-Original-To: patchwork-linux-fbdev@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 19C83C11AC for ; Thu, 16 Oct 2014 09:40:08 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 50D6920154 for ; Thu, 16 Oct 2014 09:40:07 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 6D50820176 for ; Thu, 16 Oct 2014 09:40:06 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751923AbaJPJkC (ORCPT ); Thu, 16 Oct 2014 05:40:02 -0400 Received: from devils.ext.ti.com ([198.47.26.153]:39631 "EHLO devils.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751490AbaJPJkA (ORCPT ); Thu, 16 Oct 2014 05:40:00 -0400 Received: from dlelxv90.itg.ti.com ([172.17.2.17]) by devils.ext.ti.com (8.13.7/8.13.7) with ESMTP id s9G9e0C3025936; Thu, 16 Oct 2014 04:40:00 -0500 Received: from DFLE72.ent.ti.com (dfle72.ent.ti.com [128.247.5.109]) by dlelxv90.itg.ti.com (8.14.3/8.13.8) with ESMTP id s9G9e02r027669; Thu, 16 Oct 2014 04:40:00 -0500 Received: from dflp32.itg.ti.com (10.64.6.15) by DFLE72.ent.ti.com (128.247.5.109) with Microsoft SMTP Server id 14.3.174.1; Thu, 16 Oct 2014 04:39:59 -0500 Received: from deskari.lan (ileax41-snat.itg.ti.com [10.172.224.153]) by dflp32.itg.ti.com (8.14.3/8.13.8) with ESMTP id s9G9doGD003164; Thu, 16 Oct 2014 04:39:58 -0500 From: Tomi Valkeinen To: , CC: Felipe Balbi , Tomi Valkeinen Subject: [PATCH 5/5] OMAPFB: fix releasing overlays Date: Thu, 16 Oct 2014 12:39:47 +0300 Message-ID: <1413452387-25452-5-git-send-email-tomi.valkeinen@ti.com> X-Mailer: git-send-email 2.1.1 In-Reply-To: <1413452387-25452-1-git-send-email-tomi.valkeinen@ti.com> References: <1413452387-25452-1-git-send-email-tomi.valkeinen@ti.com> MIME-Version: 1.0 Sender: linux-fbdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fbdev@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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 --- drivers/video/fbdev/omap2/omapfb/omapfb-main.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/video/fbdev/omap2/omapfb/omapfb-main.c b/drivers/video/fbdev/omap2/omapfb/omapfb-main.c index 36ffb525be73..58ffd651d2c2 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++)