提交 75185c92 编写于 作者: K Keith Packard 提交者: Dave Airlie

drm: add newlines to text sysfs files

The contents of various simple text files in sysfs should end with
a newline to make them easier to read from the console.
Signed-off-by: NKeith Packard <keithp@keithp.com>
Signed-off-by: NDave Airlie <airlied@redhat.com>
上级 9863871b
...@@ -147,7 +147,7 @@ static ssize_t status_show(struct device *device, ...@@ -147,7 +147,7 @@ static ssize_t status_show(struct device *device,
enum drm_connector_status status; enum drm_connector_status status;
status = connector->funcs->detect(connector); status = connector->funcs->detect(connector);
return snprintf(buf, PAGE_SIZE, "%s", return snprintf(buf, PAGE_SIZE, "%s\n",
drm_get_connector_status_name(status)); drm_get_connector_status_name(status));
} }
...@@ -166,7 +166,7 @@ static ssize_t dpms_show(struct device *device, ...@@ -166,7 +166,7 @@ static ssize_t dpms_show(struct device *device,
if (ret) if (ret)
return 0; return 0;
return snprintf(buf, PAGE_SIZE, "%s", return snprintf(buf, PAGE_SIZE, "%s\n",
drm_get_dpms_name((int)dpms_status)); drm_get_dpms_name((int)dpms_status));
} }
...@@ -176,7 +176,7 @@ static ssize_t enabled_show(struct device *device, ...@@ -176,7 +176,7 @@ static ssize_t enabled_show(struct device *device,
{ {
struct drm_connector *connector = to_drm_connector(device); struct drm_connector *connector = to_drm_connector(device);
return snprintf(buf, PAGE_SIZE, connector->encoder ? "enabled" : return snprintf(buf, PAGE_SIZE, "%s\n", connector->encoder ? "enabled" :
"disabled"); "disabled");
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册