diff options
author | Tomi Valkeinen <tomi.valkeinen@ti.com> | 2012-11-08 14:11:29 +0200 |
---|---|---|
committer | Tomi Valkeinen <tomi.valkeinen@ti.com> | 2012-12-07 17:05:58 +0200 |
commit | 09e82ba7011d6e94bf1eeb3f1cd0b7d441263132 (patch) | |
tree | 99b64e287830f6ccb9b68ec1bbe6efe953bed94f /drivers/video/omap2/dss/apply.c | |
parent | 8b09551338dbe1882d3d52dcc5d34ef933adbccf (diff) |
OMAPDSS: move display sysfs init to compat layer
Move creation of the sysfs files for displays to the compat layer.
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Diffstat (limited to 'drivers/video/omap2/dss/apply.c')
-rw-r--r-- | drivers/video/omap2/dss/apply.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/drivers/video/omap2/dss/apply.c b/drivers/video/omap2/dss/apply.c index 29e11434b7df..d446bdfc4c82 100644 --- a/drivers/video/omap2/dss/apply.c +++ b/drivers/video/omap2/dss/apply.c @@ -1562,6 +1562,7 @@ static DEFINE_MUTEX(compat_init_lock); int omapdss_compat_init(void) { struct platform_device *pdev = dss_get_core_pdev(); + struct omap_dss_device *dssdev = NULL; int i, r; mutex_lock(&compat_init_lock); @@ -1607,6 +1608,13 @@ int omapdss_compat_init(void) if (r) goto err_mgr_ops; + for_each_dss_dev(dssdev) { + r = display_init_sysfs(pdev, dssdev); + /* XXX uninit sysfs files on error */ + if (r) + goto err_disp_sysfs; + } + dispc_runtime_get(); r = dss_dispc_initialize_irq(); @@ -1622,6 +1630,8 @@ out: err_init_irq: dispc_runtime_put(); + +err_disp_sysfs: dss_uninstall_mgr_ops(); err_mgr_ops: @@ -1639,6 +1649,7 @@ EXPORT_SYMBOL(omapdss_compat_init); void omapdss_compat_uninit(void) { struct platform_device *pdev = dss_get_core_pdev(); + struct omap_dss_device *dssdev = NULL; mutex_lock(&compat_init_lock); @@ -1647,6 +1658,9 @@ void omapdss_compat_uninit(void) dss_dispc_uninitialize_irq(); + for_each_dss_dev(dssdev) + display_uninit_sysfs(pdev, dssdev); + dss_uninstall_mgr_ops(); dss_uninit_overlay_managers(pdev); |