platform/chrome: wilco_ec: use sysfs_emit() instead of sprintf()
authorAi Chao <aichao@kylinos.cn>
Thu, 14 Mar 2024 05:28:28 +0000 (13:28 +0800)
committerTzung-Bi Shih <tzungbi@kernel.org>
Wed, 24 Apr 2024 08:45:56 +0000 (16:45 +0800)
commit48e49af7108b6e0d014a08650c41470f812e44bc
tree76ed09c62b96d63d02e838610d2e3d90c686024c
parent0bbac3facb5d6cc0171c45c9873a2dc96bea9680
platform/chrome: wilco_ec: use sysfs_emit() instead of sprintf()

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/20240314052828.186924-1-aichao@kylinos.cn
Signed-off-by: Tzung-Bi Shih <tzungbi@kernel.org>
drivers/platform/chrome/wilco_ec/sysfs.c