projects
/
linux-2.6-microblaze.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a3b5d47
)
ALSA: ac97: Replace sprintf() with sysfs_emit()
author
Takashi Iwai
<tiwai@suse.de>
Mon, 1 Aug 2022 16:56:33 +0000
(18:56 +0200)
committer
Takashi Iwai
<tiwai@suse.de>
Tue, 2 Aug 2022 14:03:41 +0000
(16:03 +0200)
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>
sound/ac97/bus.c
patch
|
blob
|
history
diff --git
a/sound/ac97/bus.c
b/sound/ac97/bus.c
index
0d31a6d
..
0453308
100644
(file)
--- 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 s
printf
(buf, "%08x", codec->vendor_id);
+ return s
ysfs_emit
(buf, "%08x", codec->vendor_id);
}
DEVICE_ATTR_RO(vendor_id);