]> git.baikalelectronics.ru Git - kernel.git/commit
ALSA: aoa: Replace sprintf() with sysfs_emit()
authorTakashi Iwai <tiwai@suse.de>
Mon, 1 Aug 2022 16:56:34 +0000 (18:56 +0200)
committerTakashi Iwai <tiwai@suse.de>
Tue, 2 Aug 2022 14:03:42 +0000 (16:03 +0200)
commit5d97a3c4b40ad8e242c7ac36f55231fe1bacb54b
tree0de67313a528c12eb5606fbb7c96a6a182911f2d
parentbe94377fa91f92df41629f70fdd31eb93048aca4
ALSA: aoa: 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 such sprintf()
calls with sysfs_emit() while simplifying the open code in
modalias_show(); as modalias[] is a NUL-terminated string, we can pass
it straightly to a printf() argument.

Link: https://lore.kernel.org/r/20220801165639.26030-3-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/aoa/soundbus/sysfs.c