greybus: endo: Add missing '\n' sprintf() for sysfs files

Because of the missing '\n', this is how the output of reading endo
sysfs files looks:

root# cat /sys/bus/greybus/devices/endo/id
0x4755root#

Fix it by including \n to the end of the printed string.

Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Reviewed-by: Alex Elder <elder@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
This commit is contained in:
Viresh Kumar 2015-06-01 17:43:36 +05:30 committed by Greg Kroah-Hartman
parent 7ba864a19f
commit 3cb494cd6c
1 changed files with 4 additions and 4 deletions

View File

@ -49,7 +49,7 @@ static ssize_t serial_number_show(struct device *dev,
{
struct gb_endo *endo = to_gb_endo(dev);
return sprintf(buf, "%s", &endo->svc_info.serial_number[0]);
return sprintf(buf, "%s\n", &endo->svc_info.serial_number[0]);
}
static DEVICE_ATTR_RO(serial_number);
@ -58,7 +58,7 @@ static ssize_t version_show(struct device *dev,
{
struct gb_endo *endo = to_gb_endo(dev);
return sprintf(buf, "%s", &endo->svc_info.version[0]);
return sprintf(buf, "%s\n", &endo->svc_info.version[0]);
}
static DEVICE_ATTR_RO(version);
@ -78,7 +78,7 @@ static ssize_t id_show(struct device *dev,
{
struct gb_endo *endo = to_gb_endo(dev);
return sprintf(buf, "0x%04x", endo->id);
return sprintf(buf, "0x%04x\n", endo->id);
}
static DEVICE_ATTR_RO(id);
@ -87,7 +87,7 @@ static ssize_t ap_intf_id_show(struct device *dev,
{
struct gb_endo *endo = to_gb_endo(dev);
return sprintf(buf, "0x%02x", endo->ap_intf_id);
return sprintf(buf, "0x%02x\n", endo->ap_intf_id);
}
static DEVICE_ATTR_RO(ap_intf_id);