Skip to content

Commit

Permalink
ASoC: core: Fix card RTD count for deferred probe.
Browse files Browse the repository at this point in the history
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 <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
  • Loading branch information
Liam Girdwood authored and Mark Brown committed Apr 17, 2012
1 parent 86fc499 commit a7dbb60
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions sound/soc/soc-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -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++)
Expand Down

0 comments on commit a7dbb60

Please sign in to comment.