From 7f7cdbd6883fd58cfc4e538d451b455ca849bd63 Mon Sep 17 00:00:00 2001 From: Tomi Valkeinen Date: Tue, 14 May 2013 10:53:21 +0300 Subject: OMAPDSS: split overlay manager creation Split the function that creates overlay manager structs into two: one that creates just the structs, and one that creates the sysfs files for the manager. This will help us use the overlay manager structs with omapdrm in the following patches, while still leaving the sysfs files out. Signed-off-by: Tomi Valkeinen --- drivers/video/omap2/dss/manager.c | 29 ++++++++++++++++++++++------- 1 file changed, 22 insertions(+), 7 deletions(-) (limited to 'drivers/video/omap2/dss/manager.c') diff --git a/drivers/video/omap2/dss/manager.c b/drivers/video/omap2/dss/manager.c index 2551eaa14c42..1aac9b4191a9 100644 --- a/drivers/video/omap2/dss/manager.c +++ b/drivers/video/omap2/dss/manager.c @@ -36,9 +36,9 @@ static int num_managers; static struct omap_overlay_manager *managers; -int dss_init_overlay_managers(struct platform_device *pdev) +int dss_init_overlay_managers(void) { - int i, r; + int i; num_managers = dss_feat_get_num_mgrs(); @@ -76,6 +76,17 @@ int dss_init_overlay_managers(struct platform_device *pdev) dss_feat_get_supported_outputs(mgr->id); INIT_LIST_HEAD(&mgr->overlays); + } + + return 0; +} + +int dss_init_overlay_managers_sysfs(struct platform_device *pdev) +{ + int i, r; + + for (i = 0; i < num_managers; ++i) { + struct omap_overlay_manager *mgr = &managers[i]; r = dss_manager_kobj_init(mgr, pdev); if (r) @@ -85,18 +96,22 @@ int dss_init_overlay_managers(struct platform_device *pdev) return 0; } -void dss_uninit_overlay_managers(struct platform_device *pdev) +void dss_uninit_overlay_managers(void) +{ + kfree(managers); + managers = NULL; + num_managers = 0; +} + +void dss_uninit_overlay_managers_sysfs(struct platform_device *pdev) { int i; for (i = 0; i < num_managers; ++i) { struct omap_overlay_manager *mgr = &managers[i]; + dss_manager_kobj_uninit(mgr); } - - kfree(managers); - managers = NULL; - num_managers = 0; } int omap_dss_get_num_overlay_managers(void) -- cgit v1.2.3