Skip to content

Commit

Permalink
OMAPDSS: move ovl & ovl-mgr init to apply.c
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Tomi Valkeinen committed Dec 7, 2012
1 parent 8dd2491 commit 23dfd1a
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
9 changes: 9 additions & 0 deletions drivers/video/omap2/dss/apply.c
Original file line number Diff line number Diff line change
Expand Up @@ -1469,13 +1469,18 @@ static DEFINE_MUTEX(compat_init_lock);

int omapdss_compat_init(void)
{
struct platform_device *pdev = dss_get_core_pdev();

mutex_lock(&compat_init_lock);

if (compat_refcnt++ > 0)
goto out;

apply_init_priv();

dss_init_overlay_managers(pdev);
dss_init_overlays(pdev);

out:
mutex_unlock(&compat_init_lock);

Expand All @@ -1485,11 +1490,15 @@ EXPORT_SYMBOL(omapdss_compat_init);

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);
}
Expand Down
6 changes: 0 additions & 6 deletions drivers/video/omap2/dss/core.c
Original file line number Diff line number Diff line change
Expand Up @@ -234,9 +234,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;
Expand All @@ -261,9 +258,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;
Expand Down

0 comments on commit 23dfd1a

Please sign in to comment.