Commit 88e70a68 authored by Greg Kroah-Hartman's avatar Greg Kroah-Hartman

greybus: sysfs: put a \n at the end of all sysfs files

Right now some sysfs attributes have \n and some do not, so fix that and
put \n at the end of all of them to make it easier to parse things
properly in userspace.
Signed-off-by: default avatarGreg Kroah-Hartman <greg@kroah.com>
parent 23ad7bb9
...@@ -18,7 +18,7 @@ static ssize_t device_id_show(struct device *dev, struct device_attribute *attr, ...@@ -18,7 +18,7 @@ static ssize_t device_id_show(struct device *dev, struct device_attribute *attr,
{ {
struct gb_bundle *bundle = to_gb_bundle(dev); struct gb_bundle *bundle = to_gb_bundle(dev);
return sprintf(buf, "%d", bundle->device_id); return sprintf(buf, "%d\n", bundle->device_id);
} }
static DEVICE_ATTR_RO(device_id); static DEVICE_ATTR_RO(device_id);
......
...@@ -91,7 +91,7 @@ static ssize_t state_show(struct device *dev, struct device_attribute *attr, ...@@ -91,7 +91,7 @@ static ssize_t state_show(struct device *dev, struct device_attribute *attr,
{ {
struct gb_connection *connection = to_gb_connection(dev); struct gb_connection *connection = to_gb_connection(dev);
return sprintf(buf, "%d", connection->state); return sprintf(buf, "%d\n", connection->state);
} }
static DEVICE_ATTR_RO(state); static DEVICE_ATTR_RO(state);
...@@ -100,7 +100,7 @@ protocol_id_show(struct device *dev, struct device_attribute *attr, char *buf) ...@@ -100,7 +100,7 @@ protocol_id_show(struct device *dev, struct device_attribute *attr, char *buf)
{ {
struct gb_connection *connection = to_gb_connection(dev); struct gb_connection *connection = to_gb_connection(dev);
return sprintf(buf, "%d", connection->protocol->id); return sprintf(buf, "%d\n", connection->protocol->id);
} }
static DEVICE_ATTR_RO(protocol_id); static DEVICE_ATTR_RO(protocol_id);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment