ASoC: hda: use helper function

Current ASoC has many helper function.
This patch use it.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/87357rfoq1.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
Kuninori Morimoto 2023-01-31 01:59:50 +00:00 committed by Mark Brown
parent c59331b390
commit 5bf13408fd
No known key found for this signature in database
GPG Key ID: 24D68B725D5487D0
1 changed files with 5 additions and 2 deletions

View File

@ -126,12 +126,15 @@ static void hda_codec_unregister_dais(struct hda_codec *codec,
struct hda_pcm *pcm;
for_each_component_dais_safe(component, dai, save) {
int stream;
list_for_each_entry(pcm, &codec->pcm_list_head, list) {
if (strcmp(dai->driver->name, pcm->name))
continue;
snd_soc_dapm_free_widget(dai->playback_widget);
snd_soc_dapm_free_widget(dai->capture_widget);
for_each_pcm_streams(stream)
snd_soc_dapm_free_widget(snd_soc_dai_get_widget(dai, stream));
snd_soc_unregister_dai(dai);
break;
}