mirror of
https://github.com/torvalds/linux.git
synced 2024-11-23 12:42:02 +00:00
ASoC: stm32: fix sai driver name initialisation
This patch fixes the sai driver structure overwriting which results in
a cpu dai name equal NULL.
Fixes: 3e086ed
("ASoC: stm32: add SAI driver")
Signed-off-by: Arnaud Pouliquen <arnaud.pouliquen@st.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
parent
54f8844e3f
commit
17d3069ccf
@ -1419,7 +1419,6 @@ static int stm32_sai_sub_dais_init(struct platform_device *pdev,
|
||||
if (!sai->cpu_dai_drv)
|
||||
return -ENOMEM;
|
||||
|
||||
sai->cpu_dai_drv->name = dev_name(&pdev->dev);
|
||||
if (STM_SAI_IS_PLAYBACK(sai)) {
|
||||
memcpy(sai->cpu_dai_drv, &stm32_sai_playback_dai,
|
||||
sizeof(stm32_sai_playback_dai));
|
||||
@ -1429,6 +1428,7 @@ static int stm32_sai_sub_dais_init(struct platform_device *pdev,
|
||||
sizeof(stm32_sai_capture_dai));
|
||||
sai->cpu_dai_drv->capture.stream_name = sai->cpu_dai_drv->name;
|
||||
}
|
||||
sai->cpu_dai_drv->name = dev_name(&pdev->dev);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user