diff options
author | Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> | 2011-04-08 01:50:44 -0400 |
---|---|---|
committer | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2011-04-11 16:31:52 -0400 |
commit | 0671fd8ef4b32200e75396cd299f0853002fc11e (patch) | |
tree | 02f465d78fc59406ba7740664a94f61ce912f71f /sound/soc/soc-core.c | |
parent | b8eeee68dc81f08993ed5dc18dc6d574ba146674 (diff) |
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>
Diffstat (limited to 'sound/soc/soc-core.c')
-rw-r--r-- | sound/soc/soc-core.c | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c index f75f13926049..1f114673e952 100644 --- a/sound/soc/soc-core.c +++ b/sound/soc/soc-core.c | |||
@@ -1453,6 +1453,16 @@ static void soc_remove_dai_link(struct snd_soc_card *card, int num) | |||
1453 | } | 1453 | } |
1454 | } | 1454 | } |
1455 | 1455 | ||
1456 | static void soc_remove_dai_links(struct snd_soc_card *card) | ||
1457 | { | ||
1458 | int i; | ||
1459 | |||
1460 | for (i = 0; i < card->num_rtd; i++) | ||
1461 | soc_remove_dai_link(card, i); | ||
1462 | |||
1463 | card->num_rtd = 0; | ||
1464 | } | ||
1465 | |||
1456 | static void soc_set_name_prefix(struct snd_soc_card *card, | 1466 | static void soc_set_name_prefix(struct snd_soc_card *card, |
1457 | struct snd_soc_codec *codec) | 1467 | struct snd_soc_codec *codec) |
1458 | { | 1468 | { |
@@ -1960,8 +1970,7 @@ probe_aux_dev_err: | |||
1960 | soc_remove_aux_dev(card, i); | 1970 | soc_remove_aux_dev(card, i); |
1961 | 1971 | ||
1962 | probe_dai_err: | 1972 | probe_dai_err: |
1963 | for (i = 0; i < card->num_links; i++) | 1973 | soc_remove_dai_links(card); |
1964 | soc_remove_dai_link(card, i); | ||
1965 | 1974 | ||
1966 | card_probe_error: | 1975 | card_probe_error: |
1967 | if (card->remove) | 1976 | if (card->remove) |
@@ -2023,8 +2032,7 @@ static int soc_cleanup_card_resources(struct snd_soc_card *card) | |||
2023 | soc_remove_aux_dev(card, i); | 2032 | soc_remove_aux_dev(card, i); |
2024 | 2033 | ||
2025 | /* remove and free each DAI */ | 2034 | /* remove and free each DAI */ |
2026 | for (i = 0; i < card->num_rtd; i++) | 2035 | soc_remove_dai_links(card); |
2027 | soc_remove_dai_link(card, i); | ||
2028 | 2036 | ||
2029 | soc_cleanup_card_debugfs(card); | 2037 | soc_cleanup_card_debugfs(card); |
2030 | 2038 | ||