]>
Commit | Line | Data |
---|---|---|
8c770b3c GKH |
1 | From 17d3069ccf06970e2db3f7cbf4335f207524279e Mon Sep 17 00:00:00 2001 |
2 | From: Arnaud Pouliquen <arnaud.pouliquen@st.com> | |
3 | Date: Fri, 5 Apr 2019 11:19:11 +0200 | |
4 | Subject: ASoC: stm32: fix sai driver name initialisation | |
5 | ||
6 | From: Arnaud Pouliquen <arnaud.pouliquen@st.com> | |
7 | ||
8 | commit 17d3069ccf06970e2db3f7cbf4335f207524279e upstream. | |
9 | ||
10 | This patch fixes the sai driver structure overwriting which results in | |
11 | a cpu dai name equal NULL. | |
12 | ||
13 | Fixes: 3e086ed ("ASoC: stm32: add SAI driver") | |
14 | ||
15 | Signed-off-by: Arnaud Pouliquen <arnaud.pouliquen@st.com> | |
16 | Signed-off-by: Mark Brown <broonie@kernel.org> | |
17 | Signed-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 | } |