From patchwork Thu Nov 15 15:58:25 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tomi Valkeinen X-Patchwork-Id: 1750351 Return-Path: X-Original-To: patchwork-linux-fbdev@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork1.kernel.org (Postfix) with ESMTP id 0E4743FC8A for ; Thu, 15 Nov 2012 15:59:42 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1768281Ab2KOP7k (ORCPT ); Thu, 15 Nov 2012 10:59:40 -0500 Received: from comal.ext.ti.com ([198.47.26.152]:50123 "EHLO comal.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1768267Ab2KOP7i (ORCPT ); Thu, 15 Nov 2012 10:59:38 -0500 Received: from dlelxv30.itg.ti.com ([172.17.2.17]) by comal.ext.ti.com (8.13.7/8.13.7) with ESMTP id qAFFxbVO006649; Thu, 15 Nov 2012 09:59:37 -0600 Received: from DFLE72.ent.ti.com (dfle72.ent.ti.com [128.247.5.109]) by dlelxv30.itg.ti.com (8.13.8/8.13.8) with ESMTP id qAFFxbPO029932; Thu, 15 Nov 2012 09:59:37 -0600 Received: from dlelxv22.itg.ti.com (172.17.1.197) by dfle72.ent.ti.com (128.247.5.109) with Microsoft SMTP Server id 14.1.323.3; Thu, 15 Nov 2012 09:59:37 -0600 Received: from deskari.tieu.ti.com (h68-10.vpn.ti.com [172.24.68.10]) by dlelxv22.itg.ti.com (8.13.8/8.13.8) with ESMTP id qAFFx6vE025421; Thu, 15 Nov 2012 09:59:36 -0600 From: Tomi Valkeinen To: Archit Taneja , Rob Clark CC: , , Tomi Valkeinen Subject: [PATCH 17/32] OMAPDSS: move ovl & ovl-mgr init to apply.c Date: Thu, 15 Nov 2012 17:58:25 +0200 Message-ID: <1352995120-3288-18-git-send-email-tomi.valkeinen@ti.com> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1352995120-3288-1-git-send-email-tomi.valkeinen@ti.com> References: <1352995120-3288-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 Overlay and overlay_manager structs will only be needed in the compat mode. This patch moves initialization of overlay and overlay_manager structs to apply.c, so that they are handled in omapdss_compat_init(). Signed-off-by: Tomi Valkeinen --- drivers/video/omap2/dss/apply.c | 9 +++++++++ drivers/video/omap2/dss/core.c | 6 ------ 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/drivers/video/omap2/dss/apply.c b/drivers/video/omap2/dss/apply.c index 816de17..97e9b32 100644 --- a/drivers/video/omap2/dss/apply.c +++ b/drivers/video/omap2/dss/apply.c @@ -1468,6 +1468,8 @@ static int compat_refcnt; int omapdss_compat_init(void) { + struct platform_device *pdev = dss_get_core_pdev(); + mutex_lock(&apply_lock); if (compat_refcnt++ > 0) @@ -1475,6 +1477,9 @@ int omapdss_compat_init(void) apply_init_priv(); + dss_init_overlay_managers(pdev); + dss_init_overlays(pdev); + out: mutex_unlock(&apply_lock); @@ -1484,11 +1489,15 @@ EXPORT_SYMBOL(omapdss_compat_init); void omapdss_compat_uninit(void) { + struct platform_device *pdev = dss_get_core_pdev(); + mutex_lock(&apply_lock); if (--compat_refcnt > 0) goto out; + dss_uninit_overlay_managers(pdev); + dss_uninit_overlays(pdev); out: mutex_unlock(&apply_lock); } diff --git a/drivers/video/omap2/dss/core.c b/drivers/video/omap2/dss/core.c index 346638e..cf2c619 100644 --- a/drivers/video/omap2/dss/core.c +++ b/drivers/video/omap2/dss/core.c @@ -249,9 +249,6 @@ static int __init omap_dss_probe(struct platform_device *pdev) omapdss_compat_init(); - dss_init_overlay_managers(pdev); - dss_init_overlays(pdev); - r = dss_initialize_debugfs(); if (r) goto err_debugfs; @@ -276,9 +273,6 @@ static int omap_dss_remove(struct platform_device *pdev) dss_uninitialize_debugfs(); - dss_uninit_overlays(pdev); - dss_uninit_overlay_managers(pdev); - omapdss_compat_uninit(); return 0;