summaryrefslogtreecommitdiffstats
path: root/drivers/mfd/lm3533-core.c
diff options
context:
space:
mode:
authorye xingchen <ye.xingchen@zte.com.cn>2022-12-02 15:28:36 +0800
committerLee Jones <lee@kernel.org>2023-02-22 08:25:51 +0000
commit8cc5e62bae28d02f706a6abc8fd804609579964c (patch)
treef7eff3eeddc4e0d172fc0ba0d9cb40866d9c8912 /drivers/mfd/lm3533-core.c
parent5ec32a3e4053c1a726b45381d56aa9e39eaf3911 (diff)
downloadlinux-8cc5e62bae28d02f706a6abc8fd804609579964c.tar.gz
linux-8cc5e62bae28d02f706a6abc8fd804609579964c.tar.bz2
linux-8cc5e62bae28d02f706a6abc8fd804609579964c.zip
mfd: Use sysfs_emit() to instead of scnprintf()
Follow the advice of the Documentation/filesystems/sysfs.rst and 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> Signed-off-by: Lee Jones <lee@kernel.org> Link: https://lore.kernel.org/r/202212021528368292334@zte.com.cn
Diffstat (limited to 'drivers/mfd/lm3533-core.c')
-rw-r--r--drivers/mfd/lm3533-core.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/mfd/lm3533-core.c b/drivers/mfd/lm3533-core.c
index 74a553329416..946f94f3a3c3 100644
--- a/drivers/mfd/lm3533-core.c
+++ b/drivers/mfd/lm3533-core.c
@@ -286,7 +286,7 @@ static ssize_t show_output(struct device *dev,
val = (val & mask) >> shift;
- return scnprintf(buf, PAGE_SIZE, "%u\n", val);
+ return sysfs_emit(buf, "%u\n", val);
}
static ssize_t store_output(struct device *dev,