Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

+1 -5
+1 -5
sound/pci/ac97/ac97_patch.c
··· 3431 3431 static struct snd_kcontrol *snd_ac97_find_mixer_ctl(struct snd_ac97 *ac97, 3432 3432 const char *name) 3433 3433 { 3434 - struct snd_ctl_elem_id id; 3435 - memset(&id, 0, sizeof(id)); 3436 - id.iface = SNDRV_CTL_ELEM_IFACE_MIXER; 3437 - strcpy(id.name, name); 3438 - return snd_ctl_find_id(ac97->bus->card, &id); 3434 + return snd_ctl_find_id_mixer(ac97->bus->card, name); 3439 3435 } 3440 3436 3441 3437 /* create a virtual master control and add followers */