aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/sound/soc/soc-core.c
diff options
context:
space:
mode:
authorMengdong Lin <mengdong.lin@linux.intel.com>2015-11-23 11:03:52 -0500
committerMark Brown <broonie@kernel.org>2015-11-25 17:57:04 +0000
commit6f2f1ff0de83ad69f5a823ae77d1e0f77cc75d45 (patch)
tree1c39a618497814a4c78cdf03acf45683865da0fc /sound/soc/soc-core.c
parentASoC: Define soc_init_dai_link() to wrap link intialization. (diff)
downloadwireguard-linux-6f2f1ff0de83ad69f5a823ae77d1e0f77cc75d45.tar.xz
wireguard-linux-6f2f1ff0de83ad69f5a823ae77d1e0f77cc75d45.zip
ASoC: Change 2nd argument of soc_bind_dai_link() to DAI link pointer
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>
Diffstat (limited to 'sound/soc/soc-core.c')
-rw-r--r--sound/soc/soc-core.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c
index 2ecd09475d88..878a9fe92686 100644
--- a/sound/soc/soc-core.c
+++ b/sound/soc/soc-core.c
@@ -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;
@@ -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)
@@ -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;
}