]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/blame - releases/4.19.41/asoc-stm32-fix-sai-driver-name-initialisation.patch
5.1-stable patches
[thirdparty/kernel/stable-queue.git] / releases / 4.19.41 / asoc-stm32-fix-sai-driver-name-initialisation.patch
CommitLineData
8c770b3c
GKH
1From 17d3069ccf06970e2db3f7cbf4335f207524279e Mon Sep 17 00:00:00 2001
2From: Arnaud Pouliquen <arnaud.pouliquen@st.com>
3Date: Fri, 5 Apr 2019 11:19:11 +0200
4Subject: ASoC: stm32: fix sai driver name initialisation
5
6From: Arnaud Pouliquen <arnaud.pouliquen@st.com>
7
8commit 17d3069ccf06970e2db3f7cbf4335f207524279e upstream.
9
10This patch fixes the sai driver structure overwriting which results in
11a cpu dai name equal NULL.
12
13Fixes: 3e086ed ("ASoC: stm32: add SAI driver")
14
15Signed-off-by: Arnaud Pouliquen <arnaud.pouliquen@st.com>
16Signed-off-by: Mark Brown <broonie@kernel.org>
17Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
18
19---
20 sound/soc/stm/stm32_sai_sub.c | 2 +-
21 1 file changed, 1 insertion(+), 1 deletion(-)
22
23--- a/sound/soc/stm/stm32_sai_sub.c
24+++ b/sound/soc/stm/stm32_sai_sub.c
25@@ -1194,7 +1194,6 @@ static int stm32_sai_sub_dais_init(struc
26 if (!sai->cpu_dai_drv)
27 return -ENOMEM;
28
29- sai->cpu_dai_drv->name = dev_name(&pdev->dev);
30 if (STM_SAI_IS_PLAYBACK(sai)) {
31 memcpy(sai->cpu_dai_drv, &stm32_sai_playback_dai,
32 sizeof(stm32_sai_playback_dai));
33@@ -1204,6 +1203,7 @@ static int stm32_sai_sub_dais_init(struc
34 sizeof(stm32_sai_capture_dai));
35 sai->cpu_dai_drv->capture.stream_name = sai->cpu_dai_drv->name;
36 }
37+ sai->cpu_dai_drv->name = dev_name(&pdev->dev);
38
39 return 0;
40 }