From: Liam Girdwood Date: Tue, 17 Apr 2012 17:00:11 +0000 (+0100) Subject: ASoC: core: Fix card RTD count for deferred probe. X-Git-Tag: upstream/snapshot3+hdmi~7307^2~12^2~10 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=a7dbb603423d499acacefb5fad65d2b406f16370;p=platform%2Fadaptation%2Frenesas_rcar%2Frenesas_kernel.git ASoC: core: Fix card RTD count for deferred probe. Currently we increment the number of RTD's per card during the DAI link bind. This can cause an incorrect RTD count when we cannot find a component and defer the probe (and hence perform the DAI link bind for the card again). Fix the count so that it is cleared before every card registration and bind attempt. Signed-off-by: Liam Girdwood Signed-off-by: Mark Brown --- diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c index 8d2ebf5..3a4e93e 100644 --- a/sound/soc/soc-core.c +++ b/sound/soc/soc-core.c @@ -3119,6 +3119,7 @@ int snd_soc_register_card(struct snd_soc_card *card) GFP_KERNEL); if (card->rtd == NULL) return -ENOMEM; + card->num_rtd = 0; card->rtd_aux = &card->rtd[card->num_links]; for (i = 0; i < card->num_links; i++)