summaryrefslogtreecommitdiff
path: root/sound/soc/stm/stm32_sai_sub.c
diff options
context:
space:
mode:
authorMark Brown <broonie@kernel.org>2020-03-04 16:41:44 +0300
committerMark Brown <broonie@kernel.org>2020-03-04 16:41:44 +0300
commitcc6eb9b512c8411e3fa42417d9eefa1c1a86caa3 (patch)
tree1a2c124f56699330ab3ab9d6058317aa040b9182 /sound/soc/stm/stm32_sai_sub.c
parentd98bf8894bfbff7c1899a5d050106b287b12182e (diff)
parent0d6defc7e0e437a9fd53622f7fd85740f38d5693 (diff)
downloadlinux-cc6eb9b512c8411e3fa42417d9eefa1c1a86caa3.tar.xz
Merge branch 'for-5.6' of https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into asoc-5.7
Diffstat (limited to 'sound/soc/stm/stm32_sai_sub.c')
-rw-r--r--sound/soc/stm/stm32_sai_sub.c20
1 files changed, 11 insertions, 9 deletions
diff --git a/sound/soc/stm/stm32_sai_sub.c b/sound/soc/stm/stm32_sai_sub.c
index 0bbf9ed5e48b..fe4903260d4e 100644
--- a/sound/soc/stm/stm32_sai_sub.c
+++ b/sound/soc/stm/stm32_sai_sub.c
@@ -1547,21 +1547,21 @@ static int stm32_sai_sub_probe(struct platform_device *pdev)
return ret;
}
- ret = devm_snd_soc_register_component(&pdev->dev, &stm32_component,
- &sai->cpu_dai_drv, 1);
+ ret = snd_dmaengine_pcm_register(&pdev->dev, conf, 0);
+ if (ret) {
+ if (ret != -EPROBE_DEFER)
+ dev_err(&pdev->dev, "Could not register pcm dma\n");
+ return ret;
+ }
+
+ ret = snd_soc_register_component(&pdev->dev, &stm32_component,
+ &sai->cpu_dai_drv, 1);
if (ret)
return ret;
if (STM_SAI_PROTOCOL_IS_SPDIF(sai))
conf = &stm32_sai_pcm_config_spdif;
- ret = devm_snd_dmaengine_pcm_register(&pdev->dev, conf, 0);
- if (ret) {
- if (ret != -EPROBE_DEFER)
- dev_err(&pdev->dev, "PCM DMA register error %d\n", ret);
- return ret;
- }
-
return 0;
}
@@ -1570,6 +1570,8 @@ static int stm32_sai_sub_remove(struct platform_device *pdev)
struct stm32_sai_sub_data *sai = dev_get_drvdata(&pdev->dev);
clk_unprepare(sai->pdata->pclk);
+ snd_dmaengine_pcm_unregister(&pdev->dev);
+ snd_soc_unregister_component(&pdev->dev);
return 0;
}