ASoC: soc-topology.c: remove unnecessary dai_link->platform

dai_link->platform is no longer needed if CPU and Platform are
same Component. This patch removes unnecessary dai_link->platform.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/87jzz7jczp.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
Kuninori Morimoto 2023-03-23 22:53:46 +00:00 committed by Mark Brown
parent 3b0db249cf
commit e7098ba9b3
No known key found for this signature in database
GPG Key ID: 24D68B725D5487D0

View File

@ -1685,8 +1685,8 @@ static int soc_tplg_fe_link_create(struct soc_tplg *tplg,
struct snd_soc_dai_link_component *dlc; struct snd_soc_dai_link_component *dlc;
int ret; int ret;
/* link + cpu + codec + platform */ /* link + cpu + codec */
link = devm_kzalloc(tplg->dev, sizeof(*link) + (3 * sizeof(*dlc)), GFP_KERNEL); link = devm_kzalloc(tplg->dev, sizeof(*link) + (2 * sizeof(*dlc)), GFP_KERNEL);
if (link == NULL) if (link == NULL)
return -ENOMEM; return -ENOMEM;
@ -1694,11 +1694,9 @@ static int soc_tplg_fe_link_create(struct soc_tplg *tplg,
link->cpus = &dlc[0]; link->cpus = &dlc[0];
link->codecs = &dlc[1]; link->codecs = &dlc[1];
link->platforms = &dlc[2];
link->num_cpus = 1; link->num_cpus = 1;
link->num_codecs = 1; link->num_codecs = 1;
link->num_platforms = 1;
link->dobj.index = tplg->index; link->dobj.index = tplg->index;
link->dobj.type = SND_SOC_DOBJ_DAI_LINK; link->dobj.type = SND_SOC_DOBJ_DAI_LINK;
@ -1726,8 +1724,6 @@ static int soc_tplg_fe_link_create(struct soc_tplg *tplg,
link->codecs->name = "snd-soc-dummy"; link->codecs->name = "snd-soc-dummy";
link->codecs->dai_name = "snd-soc-dummy-dai"; link->codecs->dai_name = "snd-soc-dummy-dai";
link->platforms->name = "snd-soc-dummy";
/* enable DPCM */ /* enable DPCM */
link->dynamic = 1; link->dynamic = 1;
link->ignore_pmdown_time = 1; link->ignore_pmdown_time = 1;