summaryrefslogtreecommitdiff
path: root/sound
diff options
context:
space:
mode:
authorye xingchen <ye.xingchen@zte.com.cn>2022-12-05 19:43:47 +0800
committerMark Brown <broonie@kernel.org>2022-12-07 14:19:14 +0000
commita39bc7cf8e284653fb6fd9d897f269f4ac80cf52 (patch)
tree77d1e070b43278dfa154cd1c6e5e27dc8630e7ad /sound
parentef0a098efb36660326c133af9b5a04a96a00e3ca (diff)
downloadlwn-a39bc7cf8e284653fb6fd9d897f269f4ac80cf52.tar.gz
lwn-a39bc7cf8e284653fb6fd9d897f269f4ac80cf52.zip
ASoC: imx-audmux: 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> Link: https://lore.kernel.org/r/202212051943476482106@zte.com.cn Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound')
-rw-r--r--sound/soc/fsl/imx-audmux.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/sound/soc/fsl/imx-audmux.c b/sound/soc/fsl/imx-audmux.c
index 50b71e5d4589..582f1e2431ee 100644
--- a/sound/soc/fsl/imx-audmux.c
+++ b/sound/soc/fsl/imx-audmux.c
@@ -75,8 +75,7 @@ static ssize_t audmux_read_file(struct file *file, char __user *user_buf,
if (!buf)
return -ENOMEM;
- ret = scnprintf(buf, PAGE_SIZE, "PDCR: %08x\nPTCR: %08x\n",
- pdcr, ptcr);
+ ret = sysfs_emit(buf, "PDCR: %08x\nPTCR: %08x\n", pdcr, ptcr);
if (ptcr & IMX_AUDMUX_V2_PTCR_TFSDIR)
ret += scnprintf(buf + ret, PAGE_SIZE - ret,