aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/drm_sysfs.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gpu/drm/drm_sysfs.c')
-rw-r--r--drivers/gpu/drm/drm_sysfs.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/drivers/gpu/drm/drm_sysfs.c b/drivers/gpu/drm/drm_sysfs.c
index 022876ae34f..9987ab88083 100644
--- a/drivers/gpu/drm/drm_sysfs.c
+++ b/drivers/gpu/drm/drm_sysfs.c
@@ -147,7 +147,7 @@ static ssize_t status_show(struct device *device,
147 enum drm_connector_status status; 147 enum drm_connector_status status;
148 148
149 status = connector->funcs->detect(connector); 149 status = connector->funcs->detect(connector);
150 return snprintf(buf, PAGE_SIZE, "%s", 150 return snprintf(buf, PAGE_SIZE, "%s\n",
151 drm_get_connector_status_name(status)); 151 drm_get_connector_status_name(status));
152} 152}
153 153
@@ -166,7 +166,7 @@ static ssize_t dpms_show(struct device *device,
166 if (ret) 166 if (ret)
167 return 0; 167 return 0;
168 168
169 return snprintf(buf, PAGE_SIZE, "%s", 169 return snprintf(buf, PAGE_SIZE, "%s\n",
170 drm_get_dpms_name((int)dpms_status)); 170 drm_get_dpms_name((int)dpms_status));
171} 171}
172 172
@@ -176,7 +176,7 @@ static ssize_t enabled_show(struct device *device,
176{ 176{
177 struct drm_connector *connector = to_drm_connector(device); 177 struct drm_connector *connector = to_drm_connector(device);
178 178
179 return snprintf(buf, PAGE_SIZE, connector->encoder ? "enabled" : 179 return snprintf(buf, PAGE_SIZE, "%s\n", connector->encoder ? "enabled" :
180 "disabled"); 180 "disabled");
181} 181}
182 182
@@ -317,6 +317,7 @@ static struct device_attribute connector_attrs_opt1[] = {
317 317
318static struct bin_attribute edid_attr = { 318static struct bin_attribute edid_attr = {
319 .attr.name = "edid", 319 .attr.name = "edid",
320 .attr.mode = 0444,
320 .size = 128, 321 .size = 128,
321 .read = edid_show, 322 .read = edid_show,
322}; 323};
@@ -489,9 +490,7 @@ int drm_sysfs_device_add(struct drm_minor *minor)
489 490
490 return 0; 491 return 0;
491 492
492 device_unregister(&minor->kdev);
493err_out: 493err_out:
494
495 return err; 494 return err;
496} 495}
497 496