未验证 提交 628d0f72 编写于 作者: T Takashi Iwai 提交者: Mark Brown

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: NTakashi Iwai <tiwai@suse.de>
Link: https://lore.kernel.org/r/20220801170108.26340-7-tiwai@suse.deSigned-off-by: NMark Brown <broonie@kernel.org>
上级 11af2b1e
...@@ -72,7 +72,7 @@ static ssize_t pmdown_time_show(struct device *dev, ...@@ -72,7 +72,7 @@ static ssize_t pmdown_time_show(struct device *dev,
{ {
struct snd_soc_pcm_runtime *rtd = dev_get_drvdata(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, static ssize_t pmdown_time_store(struct device *dev,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册