Commit 3cb494cd authored by Viresh Kumar's avatar Viresh Kumar Committed by Greg Kroah-Hartman

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: default avatarViresh Kumar <viresh.kumar@linaro.org>
Reviewed-by: default avatarAlex Elder <elder@linaro.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@google.com>
parent 7ba864a1
......@@ -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);
......
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