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>
This commit is contained in:
parent
8dd2491a42
commit
23dfd1ac87
2 changed files with 9 additions and 6 deletions
|
@ -1469,6 +1469,8 @@ static DEFINE_MUTEX(compat_init_lock);
|
||||||
|
|
||||||
int omapdss_compat_init(void)
|
int omapdss_compat_init(void)
|
||||||
{
|
{
|
||||||
|
struct platform_device *pdev = dss_get_core_pdev();
|
||||||
|
|
||||||
mutex_lock(&compat_init_lock);
|
mutex_lock(&compat_init_lock);
|
||||||
|
|
||||||
if (compat_refcnt++ > 0)
|
if (compat_refcnt++ > 0)
|
||||||
|
@ -1476,6 +1478,9 @@ int omapdss_compat_init(void)
|
||||||
|
|
||||||
apply_init_priv();
|
apply_init_priv();
|
||||||
|
|
||||||
|
dss_init_overlay_managers(pdev);
|
||||||
|
dss_init_overlays(pdev);
|
||||||
|
|
||||||
out:
|
out:
|
||||||
mutex_unlock(&compat_init_lock);
|
mutex_unlock(&compat_init_lock);
|
||||||
|
|
||||||
|
@ -1485,11 +1490,15 @@ EXPORT_SYMBOL(omapdss_compat_init);
|
||||||
|
|
||||||
void omapdss_compat_uninit(void)
|
void omapdss_compat_uninit(void)
|
||||||
{
|
{
|
||||||
|
struct platform_device *pdev = dss_get_core_pdev();
|
||||||
|
|
||||||
mutex_lock(&compat_init_lock);
|
mutex_lock(&compat_init_lock);
|
||||||
|
|
||||||
if (--compat_refcnt > 0)
|
if (--compat_refcnt > 0)
|
||||||
goto out;
|
goto out;
|
||||||
|
|
||||||
|
dss_uninit_overlay_managers(pdev);
|
||||||
|
dss_uninit_overlays(pdev);
|
||||||
out:
|
out:
|
||||||
mutex_unlock(&compat_init_lock);
|
mutex_unlock(&compat_init_lock);
|
||||||
}
|
}
|
||||||
|
|
|
@ -234,9 +234,6 @@ static int __init omap_dss_probe(struct platform_device *pdev)
|
||||||
|
|
||||||
omapdss_compat_init();
|
omapdss_compat_init();
|
||||||
|
|
||||||
dss_init_overlay_managers(pdev);
|
|
||||||
dss_init_overlays(pdev);
|
|
||||||
|
|
||||||
r = dss_initialize_debugfs();
|
r = dss_initialize_debugfs();
|
||||||
if (r)
|
if (r)
|
||||||
goto err_debugfs;
|
goto err_debugfs;
|
||||||
|
@ -261,9 +258,6 @@ static int omap_dss_remove(struct platform_device *pdev)
|
||||||
|
|
||||||
dss_uninitialize_debugfs();
|
dss_uninitialize_debugfs();
|
||||||
|
|
||||||
dss_uninit_overlays(pdev);
|
|
||||||
dss_uninit_overlay_managers(pdev);
|
|
||||||
|
|
||||||
omapdss_compat_uninit();
|
omapdss_compat_uninit();
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|
Loading…
Add table
Reference in a new issue