projects
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a16ea09
)
ALSA: cmipci: Simplify with snd_ctl_find_id_mixer()
author
Takashi Iwai
<tiwai@suse.de>
Thu, 20 Jul 2023 08:21:06 +0000
(10:21 +0200)
committer
Takashi Iwai
<tiwai@suse.de>
Fri, 21 Jul 2023 07:10:44 +0000
(09:10 +0200)
Replace an open code with the new snd_ctl_find_id_mixer().
There is no functional change.
Link:
https://lore.kernel.org/r/20230720082108.31346-10-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/pci/cmipci.c
patch
|
blob
|
history
diff --git
a/sound/pci/cmipci.c
b/sound/pci/cmipci.c
index 6d25c12d9ef00dd31728a4c3acd95e604d1b57ec..1415baac9c361349932e2c67d6a97e9a18513527 100644
(file)
--- a/
sound/pci/cmipci.c
+++ b/
sound/pci/cmipci.c
@@
-2734,12
+2734,8
@@
static int snd_cmipci_mixer_new(struct cmipci *cm, int pcm_spdif_device)
}
for (idx = 0; idx < CM_SAVED_MIXERS; idx++) {
- struct snd_ctl_elem_id elem_id;
struct snd_kcontrol *ctl;
- memset(&elem_id, 0, sizeof(elem_id));
- elem_id.iface = SNDRV_CTL_ELEM_IFACE_MIXER;
- strcpy(elem_id.name, cm_saved_mixer[idx].name);
- ctl = snd_ctl_find_id(cm->card, &elem_id);
+ ctl = snd_ctl_find_id_mixer(cm->card, cm_saved_mixer[idx].name);
if (ctl)
cm->mixer_res_ctl[idx] = ctl;
}