aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/video/omap2
diff options
context:
space:
mode:
authorTomi Valkeinen <tomi.valkeinen@ti.com>2012-10-23 06:46:12 -0400
committerTomi Valkeinen <tomi.valkeinen@ti.com>2012-12-07 10:05:54 -0500
commit23dfd1ac87b56652e618fda24b035505c89c4b8c (patch)
treefeb6e4366870e3c690c84bbdccfae960a6e64139 /drivers/video/omap2
parent8dd2491a4216778a81668581041ba1c06453ed6c (diff)
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>
Diffstat (limited to 'drivers/video/omap2')
-rw-r--r--drivers/video/omap2/dss/apply.c9
-rw-r--r--drivers/video/omap2/dss/core.c6
2 files changed, 9 insertions, 6 deletions
diff --git a/drivers/video/omap2/dss/apply.c b/drivers/video/omap2/dss/apply.c
index ba1343274bb..6f60d0e0b7e 100644
--- a/drivers/video/omap2/dss/apply.c
+++ b/drivers/video/omap2/dss/apply.c
@@ -1469,6 +1469,8 @@ static DEFINE_MUTEX(compat_init_lock);
1469 1469
1470int omapdss_compat_init(void) 1470int omapdss_compat_init(void)
1471{ 1471{
1472 struct platform_device *pdev = dss_get_core_pdev();
1473
1472 mutex_lock(&compat_init_lock); 1474 mutex_lock(&compat_init_lock);
1473 1475
1474 if (compat_refcnt++ > 0) 1476 if (compat_refcnt++ > 0)
@@ -1476,6 +1478,9 @@ int omapdss_compat_init(void)
1476 1478
1477 apply_init_priv(); 1479 apply_init_priv();
1478 1480
1481 dss_init_overlay_managers(pdev);
1482 dss_init_overlays(pdev);
1483
1479out: 1484out:
1480 mutex_unlock(&compat_init_lock); 1485 mutex_unlock(&compat_init_lock);
1481 1486
@@ -1485,11 +1490,15 @@ EXPORT_SYMBOL(omapdss_compat_init);
1485 1490
1486void omapdss_compat_uninit(void) 1491void omapdss_compat_uninit(void)
1487{ 1492{
1493 struct platform_device *pdev = dss_get_core_pdev();
1494
1488 mutex_lock(&compat_init_lock); 1495 mutex_lock(&compat_init_lock);
1489 1496
1490 if (--compat_refcnt > 0) 1497 if (--compat_refcnt > 0)
1491 goto out; 1498 goto out;
1492 1499
1500 dss_uninit_overlay_managers(pdev);
1501 dss_uninit_overlays(pdev);
1493out: 1502out:
1494 mutex_unlock(&compat_init_lock); 1503 mutex_unlock(&compat_init_lock);
1495} 1504}
diff --git a/drivers/video/omap2/dss/core.c b/drivers/video/omap2/dss/core.c
index 86c743f5ed2..1751c1f511a 100644
--- a/drivers/video/omap2/dss/core.c
+++ b/drivers/video/omap2/dss/core.c
@@ -234,9 +234,6 @@ static int __init omap_dss_probe(struct platform_device *pdev)
234 234
235 omapdss_compat_init(); 235 omapdss_compat_init();
236 236
237 dss_init_overlay_managers(pdev);
238 dss_init_overlays(pdev);
239
240 r = dss_initialize_debugfs(); 237 r = dss_initialize_debugfs();
241 if (r) 238 if (r)
242 goto err_debugfs; 239 goto err_debugfs;
@@ -261,9 +258,6 @@ static int omap_dss_remove(struct platform_device *pdev)
261 258
262 dss_uninitialize_debugfs(); 259 dss_uninitialize_debugfs();
263 260
264 dss_uninit_overlays(pdev);
265 dss_uninit_overlay_managers(pdev);
266
267 omapdss_compat_uninit(); 261 omapdss_compat_uninit();
268 262
269 return 0; 263 return 0;