OMAPDSS: move ovl & ovl-mgr init to apply.c
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>
diff --git a/drivers/video/omap2/dss/apply.c b/drivers/video/omap2/dss/apply.c
index ba13432..6f60d0e 100644
--- a/drivers/video/omap2/dss/apply.c
+++ b/drivers/video/omap2/dss/apply.c
@@ -1469,6 +1469,8 @@
int omapdss_compat_init(void)
{
+ struct platform_device *pdev = dss_get_core_pdev();
+
mutex_lock(&compat_init_lock);
if (compat_refcnt++ > 0)
@@ -1476,6 +1478,9 @@
apply_init_priv();
+ dss_init_overlay_managers(pdev);
+ dss_init_overlays(pdev);
+
out:
mutex_unlock(&compat_init_lock);
@@ -1485,11 +1490,15 @@
void omapdss_compat_uninit(void)
{
+ struct platform_device *pdev = dss_get_core_pdev();
+
mutex_lock(&compat_init_lock);
if (--compat_refcnt > 0)
goto out;
+ dss_uninit_overlay_managers(pdev);
+ dss_uninit_overlays(pdev);
out:
mutex_unlock(&compat_init_lock);
}