platform/x86: samsung-laptop: Use sysfs_emit() to replace the old interface sprintf()
authoryunshui <jiangyunshui@kylinos.cn>
Fri, 19 Apr 2024 06:41:06 +0000 (14:41 +0800)
committerHans de Goede <hdegoede@redhat.com>
Mon, 29 Apr 2024 08:52:03 +0000 (10:52 +0200)
commit51fb2ff76f96bacdb7c886a51f9e216f24dbf33a
treed6d47745137050df056a8b7d0d2bb968eb941c4f
parent208ba5055691a8e93e3c1d222fe740c2bdc0e2f1
platform/x86: samsung-laptop: Use sysfs_emit() to replace the old interface 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/20240419064106.2396705-1-jiangyunshui@kylinos.cn
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
drivers/platform/x86/samsung-laptop.c