Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

ye xingchen and committed by
Dmitry Torokhov
51835758 7c732265

+3 -3
+3 -3
drivers/input/vivaldi-fmap.c
··· 27 27 return 0; 28 28 29 29 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]); 32 32 if (size) 33 - size += scnprintf(buf + size, PAGE_SIZE - size, "\n"); 33 + size += sysfs_emit_at(buf, size, "\n"); 34 34 35 35 return size; 36 36 }