aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/sound/soc/soc-core.c
diff options
context:
space:
mode:
authorKuninori Morimoto <kuninori.morimoto.gx@renesas.com>2023-06-21 02:18:10 +0000
committerMark Brown <broonie@kernel.org>2023-07-09 22:50:54 +0100
commit521d675d2497f890e881dc48e954a1559460e97c (patch)
treed806993addfd4707f52eaa2581c4ac500b46cb81 /sound/soc/soc-core.c
parentASoC: SOF: amd: refactor PSP smn_read (diff)
downloadwireguard-linux-521d675d2497f890e881dc48e954a1559460e97c.tar.xz
wireguard-linux-521d675d2497f890e881dc48e954a1559460e97c.zip
ASoC: soc-core.c: initialize dlc on snd_soc_get_dai_id()
Current snd_soc_get_dai_id() is initializing dlc *manually*, but it will might be a problem if dlc had new extra parameter. This patch uses default initialization, otherwise, non initialized part will be strange value. This is prepare for multi Component support. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Link: https://lore.kernel.org/r/87pm5pblst.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/soc-core.c')
-rw-r--r--sound/soc/soc-core.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c
index 1a0bde23f5e6..3b39c9d1c158 100644
--- a/sound/soc/soc-core.c
+++ b/sound/soc/soc-core.c
@@ -3235,11 +3235,12 @@ EXPORT_SYMBOL_GPL(snd_soc_get_stream_cpu);
int snd_soc_get_dai_id(struct device_node *ep)
{
struct snd_soc_component *component;
- struct snd_soc_dai_link_component dlc;
+ struct snd_soc_dai_link_component dlc = {
+ .of_node = of_graph_get_port_parent(ep),
+ };
int ret;
- dlc.of_node = of_graph_get_port_parent(ep);
- dlc.name = NULL;
+
/*
* For example HDMI case, HDMI has video/sound port,
* but ALSA SoC needs sound port number only.