diff options
author | Mark Brown <broonie@kernel.org> | 2020-03-04 14:41:44 +0100 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2020-03-04 14:41:44 +0100 |
commit | cc6eb9b512c8411e3fa42417d9eefa1c1a86caa3 (patch) | |
tree | 1a2c124f56699330ab3ab9d6058317aa040b9182 /sound/soc/stm | |
parent | Merge branch 'for-5.6' of https://git.kernel.org/pub/scm/linux/kernel/git/bro... (diff) | |
parent | ASoC: stm32: sai: manage rebind issue (diff) | |
download | linux-cc6eb9b512c8411e3fa42417d9eefa1c1a86caa3.tar.xz linux-cc6eb9b512c8411e3fa42417d9eefa1c1a86caa3.zip |
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')
-rw-r--r-- | sound/soc/stm/stm32_sai_sub.c | 20 |
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; } |