Skip to content

Commit

Permalink
ASoC: Change 2nd argument of soc_bind_dai_link() to DAI link pointer
Browse files Browse the repository at this point in the history
Just code refactoring, to reuse it if new DAI Links are added later
based on topology in component probing phase.

Signed-off-by: Mengdong Lin <mengdong.lin@linux.intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
  • Loading branch information
Mengdong Lin authored and Mark Brown committed Nov 25, 2015
1 parent 923c5e6 commit 6f2f1ff
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions sound/soc/soc-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -960,9 +960,9 @@ static struct snd_soc_dai *snd_soc_find_dai(
return NULL;
}

static int soc_bind_dai_link(struct snd_soc_card *card, int num)
static int soc_bind_dai_link(struct snd_soc_card *card,
struct snd_soc_dai_link *dai_link)
{
struct snd_soc_dai_link *dai_link = &card->dai_link[num];
struct snd_soc_pcm_runtime *rtd;
struct snd_soc_dai_link_component *codecs = dai_link->codecs;
struct snd_soc_dai_link_component cpu_dai_component;
Expand All @@ -971,7 +971,7 @@ static int soc_bind_dai_link(struct snd_soc_card *card, int num)
const char *platform_name;
int i;

dev_dbg(card->dev, "ASoC: binding %s at idx %d\n", dai_link->name, num);
dev_dbg(card->dev, "ASoC: binding %s\n", dai_link->name);

rtd = soc_new_pcm_runtime(card, dai_link);
if (!rtd)
Expand Down Expand Up @@ -1710,7 +1710,7 @@ static int snd_soc_instantiate_card(struct snd_soc_card *card)

/* bind DAIs */
for (i = 0; i < card->num_links; i++) {
ret = soc_bind_dai_link(card, i);
ret = soc_bind_dai_link(card, &card->dai_link[i]);
if (ret != 0)
goto base_error;
}
Expand Down

0 comments on commit 6f2f1ff

Please sign in to comment.