From 88e70a6846dbc3cb94d3dd2bb488bc743a1f14f1 Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Tue, 23 Dec 2014 16:09:26 -0800 Subject: [PATCH] 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: Greg Kroah-Hartman --- drivers/staging/greybus/bundle.c | 2 +- drivers/staging/greybus/connection.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/staging/greybus/bundle.c b/drivers/staging/greybus/bundle.c index 96153c5..d020660 100644 --- a/drivers/staging/greybus/bundle.c +++ b/drivers/staging/greybus/bundle.c @@ -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); - return sprintf(buf, "%d", bundle->device_id); + return sprintf(buf, "%d\n", bundle->device_id); } static DEVICE_ATTR_RO(device_id); diff --git a/drivers/staging/greybus/connection.c b/drivers/staging/greybus/connection.c index 82b03c3..c805022 100644 --- a/drivers/staging/greybus/connection.c +++ b/drivers/staging/greybus/connection.c @@ -91,7 +91,7 @@ static ssize_t state_show(struct device *dev, struct device_attribute *attr, { 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); @@ -100,7 +100,7 @@ protocol_id_show(struct device *dev, struct device_attribute *attr, char *buf) { 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); -- 2.7.4