summaryrefslogtreecommitdiffstats
path: root/sound/pci/cs46xx
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2023-07-20 10:21:00 +0200
committerTakashi Iwai <tiwai@suse.de>2023-07-21 09:10:39 +0200
commitf45828d464566140ee18089d0255199ba06db24a (patch)
tree17d3022a45e2bbe1272d54892daa4118d2cdcbc3 /sound/pci/cs46xx
parentALSA: ca0106: Simplify with snd_ctl_find_id_mixer() (diff)
downloadlinux-f45828d464566140ee18089d0255199ba06db24a.tar.xz
linux-f45828d464566140ee18089d0255199ba06db24a.zip
ALSA: cs46xx: 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-4-tiwai@suse.de Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/pci/cs46xx')
-rw-r--r--sound/pci/cs46xx/cs46xx_lib.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/sound/pci/cs46xx/cs46xx_lib.c b/sound/pci/cs46xx/cs46xx_lib.c
index 7d882b33d45e..f3a94bb537bd 100644
--- a/sound/pci/cs46xx/cs46xx_lib.c
+++ b/sound/pci/cs46xx/cs46xx_lib.c
@@ -2449,7 +2449,6 @@ static int cs46xx_detect_codec(struct snd_cs46xx *chip, int codec)
int snd_cs46xx_mixer(struct snd_cs46xx *chip, int spdif_device)
{
struct snd_card *card = chip->card;
- struct snd_ctl_elem_id id;
int err;
unsigned int idx;
static const struct snd_ac97_bus_ops ops = {
@@ -2490,10 +2489,8 @@ int snd_cs46xx_mixer(struct snd_cs46xx *chip, int spdif_device)
}
/* get EAPD mixer switch (for voyetra hack) */
- memset(&id, 0, sizeof(id));
- id.iface = SNDRV_CTL_ELEM_IFACE_MIXER;
- strcpy(id.name, "External Amplifier");
- chip->eapd_switch = snd_ctl_find_id(chip->card, &id);
+ chip->eapd_switch = snd_ctl_find_id_mixer(chip->card,
+ "External Amplifier");
#ifdef CONFIG_SND_CS46XX_NEW_DSP
if (chip->nr_ac97_codecs == 1) {