diff options
author | Takashi Iwai <tiwai@suse.de> | 2022-08-01 18:56:33 +0200 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2022-08-02 16:03:41 +0200 |
commit | 7450320ec7ab11e89e3f9b8f2c1229f3964181c1 (patch) | |
tree | 1083fb9383aa86c4e58b7935bf2b612a30586318 | |
parent | a3b5d4715fd5a839857f8b7be78dff258a8d5a47 (diff) | |
download | linux-7450320ec7ab11e89e3f9b8f2c1229f3964181c1.tar.bz2 |
ALSA: ac97: 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 open code
straightforwardly with a new helper.
Link: https://lore.kernel.org/r/20220801165639.26030-2-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
-rw-r--r-- | sound/ac97/bus.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sound/ac97/bus.c b/sound/ac97/bus.c index 0d31a6d71468..045330883a96 100644 --- a/sound/ac97/bus.c +++ b/sound/ac97/bus.c @@ -460,7 +460,7 @@ static ssize_t vendor_id_show(struct device *dev, { struct ac97_codec_device *codec = to_ac97_device(dev); - return sprintf(buf, "%08x", codec->vendor_id); + return sysfs_emit(buf, "%08x", codec->vendor_id); } DEVICE_ATTR_RO(vendor_id); |