From 6afe18224aa7167f3bf7e8e1a6dded9a8a6956a0 Mon Sep 17 00:00:00 2001 From: Hin-Tak Leung Date: Wed, 5 Aug 2020 02:18:23 +0100 Subject: [PATCH] v5.1: add .num_platform for dai_link commit 910fdcabedd2354d161b1beab6ad7dc7e859651d Author: Kuninori Morimoto Date: Mon Jan 21 09:32:32 2019 +0900 ASoC: soc-core: add .num_platform for dai_link Current snd_soc_dai_link is starting to use snd_soc_dai_link_component (= modern) style for Platform, but it is still assuming single Platform so far. We will need to have multi Platform support in the not far future. Currently only simple card is using it as sound card driver, and other drivers are converted to it from legacy style by snd_soc_init_platform(). To avoid future problem of multi Platform support, let's add num_platforms before it is too late. In the same time, to make it same naming mothed, "platform" should be "platforms". This patch fixup it too. --- seeed-voicecard.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/seeed-voicecard.c b/seeed-voicecard.c index 6a23508..0b0fb8f 100644 --- a/seeed-voicecard.c +++ b/seeed-voicecard.c @@ -43,7 +43,7 @@ struct seeed_card_data { struct asoc_simple_dai cpu_dai; struct asoc_simple_dai codec_dai; struct snd_soc_dai_link_component codecs; /* single codec */ - struct snd_soc_dai_link_component platform; + struct snd_soc_dai_link_component platforms; unsigned int mclk_fs; } *dai_props; unsigned int mclk_fs; @@ -590,7 +590,8 @@ static int seeed_voice_card_probe(struct platform_device *pdev) for (i = 0; i < num; i++) { dai_link[i].codecs = &dai_props[i].codecs; dai_link[i].num_codecs = 1; - dai_link[i].platforms = &dai_props[i].platform; + dai_link[i].platforms = &dai_props[i].platforms; + dai_link[i].num_platforms = 1; } priv->dai_props = dai_props;