diff options
author | Takashi Iwai <tiwai@suse.de> | 2023-07-20 10:21:07 +0200 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2023-07-21 09:11:02 +0200 |
commit | ca141fe31df06fd5769e3d1d41e2a7b68b308243 (patch) | |
tree | 098bbfb8f0cb00ea74adae5aa190fb4d1c52c6db /sound/soc/mediatek | |
parent | ALSA: cmipci: Simplify with snd_ctl_find_id_mixer() (diff) | |
download | linux-ca141fe31df06fd5769e3d1d41e2a7b68b308243.tar.xz linux-ca141fe31df06fd5769e3d1d41e2a7b68b308243.zip |
ASoC: mediatek: mt8188: Simplify with snd_ctl_find_id_mixer()
Replace an open code with the new snd_ctl_find_id_mixer().
There is no functional change.
Acked-by: Mark Brown <broonie@kernel.org>
Cc: Trevor Wu <trevor.wu@mediatek.com>
Link: https://lore.kernel.org/r/20230720082108.31346-11-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/soc/mediatek')
-rw-r--r-- | sound/soc/mediatek/mt8188/mt8188-mt6359.c | 12 |
1 files changed, 1 insertions, 11 deletions
diff --git a/sound/soc/mediatek/mt8188/mt8188-mt6359.c b/sound/soc/mediatek/mt8188/mt8188-mt6359.c index ac69c23e0da1..6ebcc9497ea0 100644 --- a/sound/soc/mediatek/mt8188/mt8188-mt6359.c +++ b/sound/soc/mediatek/mt8188/mt8188-mt6359.c @@ -969,16 +969,6 @@ static struct snd_soc_dai_link mt8188_mt6359_dai_links[] = { }, }; -static struct snd_kcontrol *ctl_find(struct snd_card *card, const char *name) -{ - struct snd_ctl_elem_id sid; - - memset(&sid, 0, sizeof(sid)); - strcpy(sid.name, name); - sid.iface = SNDRV_CTL_ELEM_IFACE_MIXER; - return snd_ctl_find_id(card, &sid); -} - static void mt8188_fixup_controls(struct snd_soc_card *card) { struct mt8188_mt6359_priv *priv = snd_soc_card_get_drvdata(card); @@ -995,7 +985,7 @@ static void mt8188_fixup_controls(struct snd_soc_card *card) snd_soc_dapm_free_widget(w); } - kctl = ctl_find(card->snd_card, "Headphone Switch"); + kctl = snd_ctl_find_id_mixer(card->snd_card, "Headphone Switch"); if (kctl) snd_ctl_remove(card->snd_card, kctl); else |