aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'drivers')
-rw-r--r--drivers/video/omap2/dss/manager-sysfs.c21
1 files changed, 16 insertions, 5 deletions
diff --git a/drivers/video/omap2/dss/manager-sysfs.c b/drivers/video/omap2/dss/manager-sysfs.c
index 55cf955f663d..9a2fb59b6f89 100644
--- a/drivers/video/omap2/dss/manager-sysfs.c
+++ b/drivers/video/omap2/dss/manager-sysfs.c
@@ -69,18 +69,29 @@ static ssize_t manager_display_store(struct omap_overlay_manager *mgr,
69 if (dssdev) 69 if (dssdev)
70 DSSDBG("display %s found\n", dssdev->name); 70 DSSDBG("display %s found\n", dssdev->name);
71 71
72 if (mgr->get_device(mgr)) { 72 if (mgr->output) {
73 r = mgr->unset_device(mgr); 73 r = mgr->unset_output(mgr);
74 if (r) { 74 if (r) {
75 DSSERR("failed to unset display\n"); 75 DSSERR("failed to unset current output\n");
76 goto put_device; 76 goto put_device;
77 } 77 }
78 } 78 }
79 79
80 if (dssdev) { 80 if (dssdev) {
81 r = mgr->set_device(mgr, dssdev); 81 struct omap_dss_output *out = dssdev->output;
82
83 /*
84 * a registered device should have an output connected to it
85 * already
86 */
87 if (!out) {
88 DSSERR("device has no output connected to it\n");
89 goto put_device;
90 }
91
92 r = mgr->set_output(mgr, out);
82 if (r) { 93 if (r) {
83 DSSERR("failed to set manager\n"); 94 DSSERR("failed to set manager output\n");
84 goto put_device; 95 goto put_device;
85 } 96 }
86 97