diff mbox

[17/32] OMAPDSS: move ovl & ovl-mgr init to apply.c

Message ID 1352995120-3288-18-git-send-email-tomi.valkeinen@ti.com (mailing list archive)
State New, archived
Headers show

Commit Message

Tomi Valkeinen Nov. 15, 2012, 3:58 p.m. UTC
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 <tomi.valkeinen@ti.com>
---
 drivers/video/omap2/dss/apply.c |    9 +++++++++
 drivers/video/omap2/dss/core.c  |    6 ------
 2 files changed, 9 insertions(+), 6 deletions(-)
diff mbox

Patch

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;