aboutsummaryrefslogtreecommitdiffstats
path: root/sound/core/pcm.c
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2022-08-01 18:56:37 +0200
committerTakashi Iwai <tiwai@suse.de>2022-08-02 16:03:46 +0200
commit01043e3e14d3e17acf563e0ce27abd73c6edde7f (patch)
tree5d4302114c9c1226c27db0f9f3b5f670aac71e27 /sound/core/pcm.c
parentALSA: core: Replace scnprintf() with sysfs_emit() (diff)
downloadlinux-dev-01043e3e14d3e17acf563e0ce27abd73c6edde7f.tar.xz
linux-dev-01043e3e14d3e17acf563e0ce27abd73c6edde7f.zip
ALSA: pcm: Replace sprintf() with sysfs_emit()
For sysfs outputs, it's safer to use a new helper, sysfs_emit(), instead of the raw sprintf() & co. This patch replaces such a sprintf() call straightforwardly with the new helper. Link: https://lore.kernel.org/r/20220801165639.26030-6-tiwai@suse.de Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/core/pcm.c')
-rw-r--r--sound/core/pcm.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sound/core/pcm.c b/sound/core/pcm.c
index 2ac742035310..82925709fa12 100644
--- a/sound/core/pcm.c
+++ b/sound/core/pcm.c
@@ -1031,7 +1031,7 @@ static ssize_t pcm_class_show(struct device *dev,
str = "none";
else
str = strs[pcm->dev_class];
- return sprintf(buf, "%s\n", str);
+ return sysfs_emit(buf, "%s\n", str);
}
static DEVICE_ATTR_RO(pcm_class);