aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKuninori Morimoto <[email protected]>2019-11-05 15:46:15 +0900
committerMark Brown <[email protected]>2019-11-05 23:49:55 +0000
commit95b562e57f0b3a21a3945297862cb51bc2072c7b (patch)
tree9ddea6d9e018ef34f23125cc05600766c5e743cd
parentcd3c5ad7b2503f4fb4dfcc095b3fccc2b3603c36 (diff)
ASoC: soc-core: remove duplicated soc_is_dai_link_bound()
soc_is_dai_link_bound() check will be called both *before* soc_bind_dai_link() (A), and *under* soc_bind_dai_link() (B). These are very verbose code. Let's remove one of them. * static int soc_bind_dai_link(...) { ... (B) if (soc_is_dai_link_bound(...)) { ... return 0; } ... } static int snd_soc_instantiate_card(...) { ... for_each_card_links(...) { (A) if (soc_is_dai_link_bound(...)) continue; * ret = soc_bind_dai_link(...); if (ret) goto probe_end; } ... } Signed-off-by: Kuninori Morimoto <[email protected]> Reviewed-by: Pierre-Louis Bossart <[email protected]> Reviewed-by: Ranjani Sridharan <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
-rw-r--r--sound/soc/soc-core.c3
1 files changed, 0 insertions, 3 deletions
diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c
index e1b0d861807c..3cc36c2d99da 100644
--- a/sound/soc/soc-core.c
+++ b/sound/soc/soc-core.c
@@ -2065,9 +2065,6 @@ static int snd_soc_instantiate_card(struct snd_soc_card *card)
* Components with topology may bring new DAIs and DAI links.
*/
for_each_card_links(card, dai_link) {
- if (soc_is_dai_link_bound(card, dai_link))
- continue;
-
ret = soc_bind_dai_link(card, dai_link);
if (ret)
goto probe_end;