projects
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ee14bad
)
ALSA: ac97: More cleanup with snd_ctl_find_id_mixer()
author
Takashi Iwai
<tiwai@suse.de>
Mon, 4 Mar 2024 08:21:58 +0000
(09:21 +0100)
committer
Takashi Iwai
<tiwai@suse.de>
Mon, 4 Mar 2024 08:22:51 +0000
(09:22 +0100)
There was one overlooked place to be replaced with
snd_ctl_find_id_mixer() for code simplification.
No functional change, only code refactoring.
Link:
https://lore.kernel.org/r/20240304082158.8583-1-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/pci/ac97/ac97_patch.c
patch
|
blob
|
history
diff --git
a/sound/pci/ac97/ac97_patch.c
b/sound/pci/ac97/ac97_patch.c
index 1d786bd5ce3e3ae8642bd96e748900baac6197a3..cd83aa864ea3e6e966140803a19818d663c49d72 100644
(file)
--- a/
sound/pci/ac97/ac97_patch.c
+++ b/
sound/pci/ac97/ac97_patch.c
@@
-41,12
+41,9
@@
static int patch_build_controls(struct snd_ac97 * ac97, const struct snd_kcontro
static void reset_tlv(struct snd_ac97 *ac97, const char *name,
const unsigned int *tlv)
{
- struct snd_ctl_elem_id sid;
struct snd_kcontrol *kctl;
- memset(&sid, 0, sizeof(sid));
- strcpy(sid.name, name);
- sid.iface = SNDRV_CTL_ELEM_IFACE_MIXER;
- kctl = snd_ctl_find_id(ac97->bus->card, &sid);
+
+ kctl = snd_ctl_find_id_mixer(ac97->bus->card, name);
if (kctl && kctl->tlv.p)
kctl->tlv.p = tlv;
}