diff options
author | ye xingchen <ye.xingchen@zte.com.cn> | 2023-12-12 22:41:50 -0800 |
---|---|---|
committer | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2023-12-13 21:26:12 -0800 |
commit | 51835758e8a9ce089c47358ea373de82309234de (patch) | |
tree | d91f5bfdf23551bb7ae069d16a851daa1fcd6e28 /drivers/input | |
parent | 7c73226525702e89aad9fe4c4683826ed5e24361 (diff) | |
download | lwn-51835758e8a9ce089c47358ea373de82309234de.tar.gz lwn-51835758e8a9ce089c47358ea373de82309234de.zip |
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>
Diffstat (limited to 'drivers/input')
-rw-r--r-- | drivers/input/vivaldi-fmap.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/input/vivaldi-fmap.c b/drivers/input/vivaldi-fmap.c index 6dae83d96806..0d29ec014e2f 100644 --- a/drivers/input/vivaldi-fmap.c +++ b/drivers/input/vivaldi-fmap.c @@ -27,10 +27,10 @@ ssize_t vivaldi_function_row_physmap_show(const struct vivaldi_data *data, return 0; for (i = 0; i < data->num_function_row_keys; i++) - size += scnprintf(buf + size, PAGE_SIZE - size, - "%s%02X", size ? " " : "", physmap[i]); + size += sysfs_emit_at(buf, size, + "%s%02X", size ? " " : "", physmap[i]); if (size) - size += scnprintf(buf + size, PAGE_SIZE - size, "\n"); + size += sysfs_emit_at(buf, size, "\n"); return size; } |