Commit 5bf13408 authored by Kuninori Morimoto's avatar Kuninori Morimoto Committed by Mark Brown

ASoC: hda: use helper function

Current ASoC has many helper function.
This patch use it.
Signed-off-by: default avatarKuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/87357rfoq1.wl-kuninori.morimoto.gx@renesas.comSigned-off-by: default avatarMark Brown <broonie@kernel.org>
parent c59331b3
...@@ -126,12 +126,15 @@ static void hda_codec_unregister_dais(struct hda_codec *codec, ...@@ -126,12 +126,15 @@ static void hda_codec_unregister_dais(struct hda_codec *codec,
struct hda_pcm *pcm; struct hda_pcm *pcm;
for_each_component_dais_safe(component, dai, save) { for_each_component_dais_safe(component, dai, save) {
int stream;
list_for_each_entry(pcm, &codec->pcm_list_head, list) { list_for_each_entry(pcm, &codec->pcm_list_head, list) {
if (strcmp(dai->driver->name, pcm->name)) if (strcmp(dai->driver->name, pcm->name))
continue; continue;
snd_soc_dapm_free_widget(dai->playback_widget); for_each_pcm_streams(stream)
snd_soc_dapm_free_widget(dai->capture_widget); snd_soc_dapm_free_widget(snd_soc_dai_get_widget(dai, stream));
snd_soc_unregister_dai(dai); snd_soc_unregister_dai(dai);
break; break;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment