summaryrefslogtreecommitdiff
path: root/sound/pci/ac97/ac97_patch.c
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2023-07-20 11:21:08 +0300
committerTakashi Iwai <tiwai@suse.de>2023-07-21 10:11:24 +0300
commitebc1bfebdacab9e7fd77eec2c5dbcef73980ab00 (patch)
tree1522d2df731888dbf11e282e93615d2031ee2b3d /sound/pci/ac97/ac97_patch.c
parentca141fe31df06fd5769e3d1d41e2a7b68b308243 (diff)
downloadlinux-ebc1bfebdacab9e7fd77eec2c5dbcef73980ab00.tar.xz
ALSA: ac97: Simplify with snd_ctl_find_id_mixer()
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-12-tiwai@suse.de Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/pci/ac97/ac97_patch.c')
-rw-r--r--sound/pci/ac97/ac97_patch.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/sound/pci/ac97/ac97_patch.c b/sound/pci/ac97/ac97_patch.c
index 4b5f33de70d5..ccfd9c7bf900 100644
--- a/sound/pci/ac97/ac97_patch.c
+++ b/sound/pci/ac97/ac97_patch.c
@@ -3431,11 +3431,7 @@ static const char * const follower_sws_vt1616[] = {
static struct snd_kcontrol *snd_ac97_find_mixer_ctl(struct snd_ac97 *ac97,
const char *name)
{
- struct snd_ctl_elem_id id;
- memset(&id, 0, sizeof(id));
- id.iface = SNDRV_CTL_ELEM_IFACE_MIXER;
- strcpy(id.name, name);
- return snd_ctl_find_id(ac97->bus->card, &id);
+ return snd_ctl_find_id_mixer(ac97->bus->card, name);
}
/* create a virtual master control and add followers */