Commit 0aab7bda authored by Takashi Iwai's avatar Takashi Iwai Committed by Mark Brown

ASoC: Intel: sst: 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>
Link: https://lore.kernel.org/r/20220801170108.26340-4-tiwai@suse.deSigned-off-by: default avatarMark Brown <broonie@kernel.org>
parent 1218d67d
......@@ -242,11 +242,11 @@ static ssize_t firmware_version_show(struct device *dev,
if (ctx->fw_version.type == 0 && ctx->fw_version.major == 0 &&
ctx->fw_version.minor == 0 && ctx->fw_version.build == 0)
return sprintf(buf, "FW not yet loaded\n");
return sysfs_emit(buf, "FW not yet loaded\n");
else
return sprintf(buf, "v%02x.%02x.%02x.%02x\n",
ctx->fw_version.type, ctx->fw_version.major,
ctx->fw_version.minor, ctx->fw_version.build);
return sysfs_emit(buf, "v%02x.%02x.%02x.%02x\n",
ctx->fw_version.type, ctx->fw_version.major,
ctx->fw_version.minor, ctx->fw_version.build);
}
......
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