Skip to content

Commit a39bc7c

Browse files
ye xingchenbroonie
authored andcommitted
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 <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
1 parent ef0a098 commit a39bc7c

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

sound/soc/fsl/imx-audmux.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,8 +75,7 @@ static ssize_t audmux_read_file(struct file *file, char __user *user_buf,
7575
if (!buf)
7676
return -ENOMEM;
7777

78-
ret = scnprintf(buf, PAGE_SIZE, "PDCR: %08x\nPTCR: %08x\n",
79-
pdcr, ptcr);
78+
ret = sysfs_emit(buf, "PDCR: %08x\nPTCR: %08x\n", pdcr, ptcr);
8079

8180
if (ptcr & IMX_AUDMUX_V2_PTCR_TFSDIR)
8281
ret += scnprintf(buf + ret, PAGE_SIZE - ret,

0 commit comments

Comments
 (0)