Commit 51835758 authored by ye xingchen's avatar ye xingchen Committed by Dmitry Torokhov

Input: vivaldi - convert to use sysfs_emit_at() API

Follow the advice of the Documentation/filesystems/sysfs.rst and show()
should only use sysfs_emit() or sysfs_emit_at() when formatting the
value to be returned to user space.
Signed-off-by: default avatarye xingchen <ye.xingchen@zte.com.cn>
Link: https://lore.kernel.org/r/202212071644171074630@zte.com.cnSigned-off-by: default avatarDmitry Torokhov <dmitry.torokhov@gmail.com>
parent 7c732265
...@@ -27,10 +27,10 @@ ssize_t vivaldi_function_row_physmap_show(const struct vivaldi_data *data, ...@@ -27,10 +27,10 @@ ssize_t vivaldi_function_row_physmap_show(const struct vivaldi_data *data,
return 0; return 0;
for (i = 0; i < data->num_function_row_keys; i++) for (i = 0; i < data->num_function_row_keys; i++)
size += scnprintf(buf + size, PAGE_SIZE - size, size += sysfs_emit_at(buf, size,
"%s%02X", size ? " " : "", physmap[i]); "%s%02X", size ? " " : "", physmap[i]);
if (size) if (size)
size += scnprintf(buf + size, PAGE_SIZE - size, "\n"); size += sysfs_emit_at(buf, size, "\n");
return size; return size;
} }
......
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