platform/x86: asus-laptop: Use sysfs_emit() and sysfs_emit_at() to replace sprintf()
authoryunshui <jiangyunshui@kylinos.cn>
Mon, 22 Apr 2024 06:29:15 +0000 (14:29 +0800)
committerHans de Goede <hdegoede@redhat.com>
Mon, 29 Apr 2024 08:52:03 +0000 (10:52 +0200)
commit5c94664cf2793e0d0534cb561f1549ed4bb841f1
tree5457a7660c6bf115a09ca02ed64122ef65fabc30
parent51fb2ff76f96bacdb7c886a51f9e216f24dbf33a
platform/x86: asus-laptop: Use sysfs_emit() and sysfs_emit_at() to replace sprintf()

As Documentation/filesystems/sysfs.rst suggested,
show() should only use sysfs_emit() or sysfs_emit_at() when formatting
the value to be returned to user space.

Signed-off-by: yunshui <jiangyunshui@kylinos.cn>
Reviewed-by: Ai Chao <aichao@kylinos.cn>
Link: https://lore.kernel.org/r/20240422062915.3393480-1-jiangyunshui@kylinos.cn
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
drivers/platform/x86/asus-laptop.c