summaryrefslogtreecommitdiff
path: root/sound/soc/soc-core.c
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2022-08-01 19:01:06 +0200
committerMark Brown <broonie@kernel.org>2022-08-15 01:19:49 +0100
commit628d0f72d5828611cae353bd8b49d7647711c283 (patch)
tree6637ec6ecd022afcfcf6280ae7b23f2cd755a604 /sound/soc/soc-core.c
parent11af2b1e33e8c9e72ddf14cd61f9494f34e06c40 (diff)
ASoC: core: 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 the sprintf() usage straightforwardly with a new helper, sysfs_emit(). Signed-off-by: Takashi Iwai <tiwai@suse.de> Link: https://lore.kernel.org/r/20220801170108.26340-7-tiwai@suse.de Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/soc-core.c')
-rw-r--r--sound/soc/soc-core.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c
index e824ff1a9fc0..e020ab49cfb1 100644
--- a/sound/soc/soc-core.c
+++ b/sound/soc/soc-core.c
@@ -72,7 +72,7 @@ static ssize_t pmdown_time_show(struct device *dev,
{
struct snd_soc_pcm_runtime *rtd = dev_get_drvdata(dev);
- return sprintf(buf, "%ld\n", rtd->pmdown_time);
+ return sysfs_emit(buf, "%ld\n", rtd->pmdown_time);
}
static ssize_t pmdown_time_store(struct device *dev,