Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 344689
b: refs/heads/master
c: 09e82ba
h: refs/heads/master
i:
  344687: e6df07c
v: v3
  • Loading branch information
Tomi Valkeinen committed Dec 7, 2012
1 parent 65057a3 commit 615267b
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 33 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 8b09551338dbe1882d3d52dcc5d34ef933adbccf
refs/heads/master: 09e82ba7011d6e94bf1eeb3f1cd0b7d441263132
14 changes: 14 additions & 0 deletions trunk/drivers/video/omap2/dss/apply.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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();
Expand All @@ -1622,6 +1630,8 @@ int omapdss_compat_init(void)

err_init_irq:
dispc_runtime_put();

err_disp_sysfs:
dss_uninstall_mgr_ops();

err_mgr_ops:
Expand All @@ -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);

Expand All @@ -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);
Expand Down
7 changes: 0 additions & 7 deletions trunk/drivers/video/omap2/dss/core.c
Original file line number Diff line number Diff line change
Expand Up @@ -347,15 +347,10 @@ static int dss_driver_probe(struct device *dev)
dev_name(dev), dssdev->driver_name,
dssdrv->driver.name);

r = dss_init_device(core.pdev, dssdev);
if (r)
return r;

r = dssdrv->probe(dssdev);

if (r) {
DSSERR("driver probe failed: %d\n", r);
dss_uninit_device(core.pdev, dssdev);
return r;
}

Expand All @@ -376,8 +371,6 @@ static int dss_driver_remove(struct device *dev)

dssdrv->remove(dssdev);

dss_uninit_device(core.pdev, dssdev);

dssdev->driver = NULL;

return 0;
Expand Down
20 changes: 0 additions & 20 deletions trunk/drivers/video/omap2/dss/display.c
Original file line number Diff line number Diff line change
Expand Up @@ -76,26 +76,6 @@ void omapdss_default_get_timings(struct omap_dss_device *dssdev,
}
EXPORT_SYMBOL(omapdss_default_get_timings);

int dss_init_device(struct platform_device *pdev,
struct omap_dss_device *dssdev)
{
int r;

r = display_init_sysfs(pdev, dssdev);
if (r) {
omapdss_output_unset_device(dssdev->output);
return r;
}

return 0;
}

void dss_uninit_device(struct platform_device *pdev,
struct omap_dss_device *dssdev)
{
display_uninit_sysfs(pdev, dssdev);
}

static int dss_suspend_device(struct device *dev, void *data)
{
struct omap_dss_device *dssdev = to_dss_device(dev);
Expand Down
5 changes: 0 additions & 5 deletions trunk/drivers/video/omap2/dss/dss.h
Original file line number Diff line number Diff line change
Expand Up @@ -201,11 +201,6 @@ int dss_suspend_all_devices(void);
int dss_resume_all_devices(void);
void dss_disable_all_devices(void);

int dss_init_device(struct platform_device *pdev,
struct omap_dss_device *dssdev);
void dss_uninit_device(struct platform_device *pdev,
struct omap_dss_device *dssdev);

int display_init_sysfs(struct platform_device *pdev,
struct omap_dss_device *dssdev);
void display_uninit_sysfs(struct platform_device *pdev,
Expand Down

0 comments on commit 615267b

Please sign in to comment.