ASoC: Add soc_remove_dai_links

card->num_rtd should be 0 after soc_romve_dai_link

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
This commit is contained in:
Kuninori Morimoto 2011-04-08 14:50:44 +09:00 коммит произвёл Mark Brown
Родитель b8eeee68dc
Коммит 0671fd8ef4
1 изменённых файлов: 12 добавлений и 4 удалений

Просмотреть файл

@ -1453,6 +1453,16 @@ static void soc_remove_dai_link(struct snd_soc_card *card, int num)
} }
} }
static void soc_remove_dai_links(struct snd_soc_card *card)
{
int i;
for (i = 0; i < card->num_rtd; i++)
soc_remove_dai_link(card, i);
card->num_rtd = 0;
}
static void soc_set_name_prefix(struct snd_soc_card *card, static void soc_set_name_prefix(struct snd_soc_card *card,
struct snd_soc_codec *codec) struct snd_soc_codec *codec)
{ {
@ -1960,8 +1970,7 @@ probe_aux_dev_err:
soc_remove_aux_dev(card, i); soc_remove_aux_dev(card, i);
probe_dai_err: probe_dai_err:
for (i = 0; i < card->num_links; i++) soc_remove_dai_links(card);
soc_remove_dai_link(card, i);
card_probe_error: card_probe_error:
if (card->remove) if (card->remove)
@ -2023,8 +2032,7 @@ static int soc_cleanup_card_resources(struct snd_soc_card *card)
soc_remove_aux_dev(card, i); soc_remove_aux_dev(card, i);
/* remove and free each DAI */ /* remove and free each DAI */
for (i = 0; i < card->num_rtd; i++) soc_remove_dai_links(card);
soc_remove_dai_link(card, i);
soc_cleanup_card_debugfs(card); soc_cleanup_card_debugfs(card);