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

ASoC: Intel: skylake: 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 those usages
straightforwardly with a new helper, sysfs_emit().
Signed-off-by: NTakashi Iwai <tiwai@suse.de>
Acked-by: NCezary Rojewski <cezary.rojewski@intel.com>
Link: https://lore.kernel.org/r/20220801170108.26340-6-tiwai@suse.deSigned-off-by: NMark Brown <broonie@kernel.org>
上级 7ae8d8ea
...@@ -61,7 +61,7 @@ static ssize_t platform_id_show(struct device *dev, ...@@ -61,7 +61,7 @@ static ssize_t platform_id_show(struct device *dev,
nhlt->header.oem_revision); nhlt->header.oem_revision);
skl_nhlt_trim_space(platform_id); skl_nhlt_trim_space(platform_id);
return sprintf(buf, "%s\n", platform_id); return sysfs_emit(buf, "%s\n", platform_id);
} }
static DEVICE_ATTR_RO(platform_id); static DEVICE_ATTR_RO(platform_id);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册