platform/chrome: use sysfs_emit() instead of scnprintf()
authorye xingchen <ye.xingchen@zte.com.cn>
Fri, 2 Dec 2022 08:56:04 +0000 (16:56 +0800)
committerTzung-Bi Shih <tzungbi@kernel.org>
Mon, 26 Dec 2022 03:14:34 +0000 (11:14 +0800)
commit256b734efc7494eb3c45f3ff5abd632ff0afde03
treed6086462cc59b07d7c9367fa24714cf20d719da1
parent1b929c02afd37871d5afb9d498426f83432e71c2
platform/chrome: use sysfs_emit() instead of scnprintf()

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: ye xingchen <ye.xingchen@zte.com.cn>
Link: https://lore.kernel.org/r/202212021656040995199@zte.com.cn
[tzungbi: fixed the commit message.]
Signed-off-by: Tzung-Bi Shih <tzungbi@kernel.org>
drivers/platform/chrome/cros_ec_lightbar.c
drivers/platform/chrome/cros_ec_sysfs.c
drivers/platform/chrome/wilco_ec/sysfs.c