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:
parent
7ba864a19f
commit
3cb494cd6c
@ -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);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user