Skip to content

Commit 5183575

Browse files
ye xingchendtor
authored andcommitted
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: ye xingchen <ye.xingchen@zte.com.cn> Link: https://lore.kernel.org/r/202212071644171074630@zte.com.cn Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
1 parent 7c73226 commit 5183575

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

drivers/input/vivaldi-fmap.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,10 @@ ssize_t vivaldi_function_row_physmap_show(const struct vivaldi_data *data,
2727
return 0;
2828

2929
for (i = 0; i < data->num_function_row_keys; i++)
30-
size += scnprintf(buf + size, PAGE_SIZE - size,
31-
"%s%02X", size ? " " : "", physmap[i]);
30+
size += sysfs_emit_at(buf, size,
31+
"%s%02X", size ? " " : "", physmap[i]);
3232
if (size)
33-
size += scnprintf(buf + size, PAGE_SIZE - size, "\n");
33+
size += sysfs_emit_at(buf, size, "\n");
3434

3535
return size;
3636
}

0 commit comments

Comments
 (0)