Commit 79bd127
platform/x86: asus-wmi: use sysfs_emit() instead of sprintf()
This changes all *_show attributes in asus-wmi.c to use sysfs_emit()
instead of the older method of writing to the output buffer manually.
Follow the advice in Documentation/filesystems/sysfs.rst:
show() should only use sysfs_emit() or sysfs_emit_at() when formatting
the value to be returned to user space.
Signed-off-by: Ai Chao <aichao@kylinos.cn>
Link: https://lore.kernel.org/r/20240319055636.150289-1-aichao@kylinos.cn
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>1 parent 6d9b262 commit 79bd127
1 file changed
+4
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2326 | 2326 | | |
2327 | 2327 | | |
2328 | 2328 | | |
2329 | | - | |
| 2329 | + | |
2330 | 2330 | | |
2331 | 2331 | | |
2332 | 2332 | | |
| |||
2512 | 2512 | | |
2513 | 2513 | | |
2514 | 2514 | | |
2515 | | - | |
2516 | | - | |
| 2515 | + | |
| 2516 | + | |
2517 | 2517 | | |
2518 | 2518 | | |
2519 | 2519 | | |
| |||
4061 | 4061 | | |
4062 | 4062 | | |
4063 | 4063 | | |
4064 | | - | |
| 4064 | + | |
4065 | 4065 | | |
4066 | 4066 | | |
4067 | 4067 | | |
| |||
0 commit comments