diff options
author | Takashi Iwai <tiwai@suse.de> | 2022-08-01 19:01:02 +0200 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2022-08-15 02:19:45 +0200 |
commit | 1218d67d376156aa8dc9dbc39616867823f60783 (patch) | |
tree | b29470287b0463070f020ee6f3f19e736e80ece3 | |
parent | ASoC: cs43130: Replace scnprintf() with sysfs_emit() (diff) | |
download | linux-1218d67d376156aa8dc9dbc39616867823f60783.tar.xz linux-1218d67d376156aa8dc9dbc39616867823f60783.zip |
ASoC: tlv320aic26: 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: Takashi Iwai <tiwai@suse.de>
Link: https://lore.kernel.org/r/20220801170108.26340-3-tiwai@suse.de
Signed-off-by: Mark Brown <broonie@kernel.org>
-rw-r--r-- | sound/soc/codecs/tlv320aic26.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sound/soc/codecs/tlv320aic26.c b/sound/soc/codecs/tlv320aic26.c index 8bae4b475068..e5dfb3d752a3 100644 --- a/sound/soc/codecs/tlv320aic26.c +++ b/sound/soc/codecs/tlv320aic26.c @@ -271,7 +271,7 @@ static ssize_t keyclick_show(struct device *dev, freq = (125 << ((val >> 8) & 0x7)) >> 1; len = 2 * (1 + ((val >> 4) & 0xf)); - return sprintf(buf, "amp=%x freq=%iHz len=%iclks\n", amp, freq, len); + return sysfs_emit(buf, "amp=%x freq=%iHz len=%iclks\n", amp, freq, len); } /* Any write to the keyclick attribute will trigger the keyclick event */ |