diff options
author | Takashi Iwai <tiwai@suse.de> | 2023-08-28 12:56:39 +0300 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2023-08-28 12:56:39 +0300 |
commit | b94a62a663d3c863fac320a6bf60bf8bcf93d81d (patch) | |
tree | e89060f997121ce6d216b0405ac07d295c9c47bb /sound/pci/ac97/ac97_patch.c | |
parent | 37e44d60cb875862930359e16a1f4764cedb342b (diff) | |
parent | 0982e519df6a3fa2dd6858217547460238e47e70 (diff) | |
download | linux-b94a62a663d3c863fac320a6bf60bf8bcf93d81d.tar.xz |
Merge branch 'for-next' into for-linus
Pull materials for 6.5 merge window.
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.c | 22 |
1 files changed, 2 insertions, 20 deletions
diff --git a/sound/pci/ac97/ac97_patch.c b/sound/pci/ac97/ac97_patch.c index 4b5f33de70d5..1d786bd5ce3e 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 */ @@ -3444,7 +3440,6 @@ static int snd_ac97_add_vmaster(struct snd_ac97 *ac97, char *name, const char * const *followers) { struct snd_kcontrol *kctl; - const char * const *s; int err; kctl = snd_ctl_make_virtual_master(name, tlv); @@ -3454,20 +3449,7 @@ static int snd_ac97_add_vmaster(struct snd_ac97 *ac97, char *name, if (err < 0) return err; - for (s = followers; *s; s++) { - struct snd_kcontrol *sctl; - - sctl = snd_ac97_find_mixer_ctl(ac97, *s); - if (!sctl) { - dev_dbg(ac97->bus->card->dev, - "Cannot find follower %s, skipped\n", *s); - continue; - } - err = snd_ctl_add_follower(kctl, sctl); - if (err < 0) - return err; - } - return 0; + return snd_ctl_add_followers(ac97->bus->card, kctl, followers); } static int patch_vt1616_specific(struct snd_ac97 * ac97) |