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: Takashi Iwai <tiwai@suse.de> Acked-by: Cezary Rojewski <cezary.rojewski@intel.com> Link: https://lore.kernel.org/r/20220801170108.26340-6-tiwai@suse.de Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
Родитель
7ae8d8ea94
Коммит
11af2b1e33
|
@ -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);
|
||||
|
|
Загрузка…
Ссылка в новой задаче