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:
0031812
)
ALSA: pcm: Replace sprintf() with sysfs_emit()
author
Takashi Iwai
<tiwai@suse.de>
Mon, 1 Aug 2022 16:56:37 +0000
(18:56 +0200)
committer
Takashi Iwai
<tiwai@suse.de>
Tue, 2 Aug 2022 14:03:46 +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 such a
sprintf() call straightforwardly with the new helper.
Link:
https://lore.kernel.org/r/20220801165639.26030-6-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/core/pcm.c
patch
|
blob
|
history
diff --git
a/sound/core/pcm.c
b/sound/core/pcm.c
index
2ac7420
..
8292570
100644
(file)
--- a/
sound/core/pcm.c
+++ b/
sound/core/pcm.c
@@
-1031,7
+1031,7
@@
static ssize_t pcm_class_show(struct device *dev,
str = "none";
else
str = strs[pcm->dev_class];
- return s
printf
(buf, "%s\n", str);
+ return s
ysfs_emit
(buf, "%s\n", str);
}
static DEVICE_ATTR_RO(pcm_class);