diff options
Diffstat (limited to 'drivers/video/omap2/dss/manager-sysfs.c')
-rw-r--r-- | drivers/video/omap2/dss/manager-sysfs.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/drivers/video/omap2/dss/manager-sysfs.c b/drivers/video/omap2/dss/manager-sysfs.c index 9b875fbe757e..55cf955f663d 100644 --- a/drivers/video/omap2/dss/manager-sysfs.c +++ b/drivers/video/omap2/dss/manager-sysfs.c | |||
@@ -38,8 +38,10 @@ static ssize_t manager_name_show(struct omap_overlay_manager *mgr, char *buf) | |||
38 | 38 | ||
39 | static ssize_t manager_display_show(struct omap_overlay_manager *mgr, char *buf) | 39 | static ssize_t manager_display_show(struct omap_overlay_manager *mgr, char *buf) |
40 | { | 40 | { |
41 | return snprintf(buf, PAGE_SIZE, "%s\n", | 41 | struct omap_dss_device *dssdev = mgr->get_device(mgr); |
42 | mgr->device ? mgr->device->name : "<none>"); | 42 | |
43 | return snprintf(buf, PAGE_SIZE, "%s\n", dssdev ? | ||
44 | dssdev->name : "<none>"); | ||
43 | } | 45 | } |
44 | 46 | ||
45 | static ssize_t manager_display_store(struct omap_overlay_manager *mgr, | 47 | static ssize_t manager_display_store(struct omap_overlay_manager *mgr, |
@@ -67,7 +69,7 @@ static ssize_t manager_display_store(struct omap_overlay_manager *mgr, | |||
67 | if (dssdev) | 69 | if (dssdev) |
68 | DSSDBG("display %s found\n", dssdev->name); | 70 | DSSDBG("display %s found\n", dssdev->name); |
69 | 71 | ||
70 | if (mgr->device) { | 72 | if (mgr->get_device(mgr)) { |
71 | r = mgr->unset_device(mgr); | 73 | r = mgr->unset_device(mgr); |
72 | if (r) { | 74 | if (r) { |
73 | DSSERR("failed to unset display\n"); | 75 | DSSERR("failed to unset display\n"); |