projects
/
linux-2.6-microblaze.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7c73226
)
Input: vivaldi - convert to use sysfs_emit_at() API
author
ye xingchen
<ye.xingchen@zte.com.cn>
Wed, 13 Dec 2023 06:41:50 +0000
(22:41 -0800)
committer
Dmitry Torokhov
<dmitry.torokhov@gmail.com>
Thu, 14 Dec 2023 05:26:12 +0000
(21:26 -0800)
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>
drivers/input/vivaldi-fmap.c
patch
|
blob
|
history
diff --git
a/drivers/input/vivaldi-fmap.c
b/drivers/input/vivaldi-fmap.c
index
6dae83d
..
0d29ec0
100644
(file)
--- 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 += s
cnprintf(buf + size, PAGE_SIZE -
size,
- "%s%02X", size ? " " : "", physmap[i]);
+ size += s
ysfs_emit_at(buf,
size,
+
"%s%02X", size ? " " : "", physmap[i]);
if (size)
- size += s
cnprintf(buf + size, PAGE_SIZE -
size, "\n");
+ size += s
ysfs_emit_at(buf,
size, "\n");
return size;
}