Commit 11af2b1e authored by Takashi Iwai's avatar Takashi Iwai Committed by 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: default avatarTakashi Iwai <tiwai@suse.de>
Acked-by: default avatarCezary Rojewski <cezary.rojewski@intel.com>
Link: https://lore.kernel.org/r/20220801170108.26340-6-tiwai@suse.deSigned-off-by: default avatarMark Brown <broonie@kernel.org>
parent 7ae8d8ea
......@@ -61,7 +61,7 @@ static ssize_t platform_id_show(struct device *dev,
nhlt->header.oem_revision);
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);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment