summaryrefslogtreecommitdiff
path: root/sound/soc/samsung
diff options
context:
space:
mode:
authorMark Brown <broonie@opensource.wolfsonmicro.com>2011-12-12 19:05:58 +0800
committerMark Brown <broonie@opensource.wolfsonmicro.com>2011-12-14 13:53:47 +0800
commit0c9f110574bdde21ac62b948272a90f6e72b94d8 (patch)
tree4ffdd5119ccf7b71ab9ebeace9ac1e1452729075 /sound/soc/samsung
parent8858d21891ad6aecced34c31ae961584ad418522 (diff)
ASoC: Complete initialisation before registering Samsung PCM DAI
Otherwise there's a race where the DAI might get used without everything having been set up. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Sangbeom Kim <sbkim73@samsung.com>
Diffstat (limited to 'sound/soc/samsung')
-rw-r--r--sound/soc/samsung/pcm.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/sound/soc/samsung/pcm.c b/sound/soc/samsung/pcm.c
index beef63fca05..3a29c268ea5 100644
--- a/sound/soc/samsung/pcm.c
+++ b/sound/soc/samsung/pcm.c
@@ -570,12 +570,6 @@ static __devinit int s3c_pcm_dev_probe(struct platform_device *pdev)
}
clk_enable(pcm->pclk);
- ret = snd_soc_register_dai(&pdev->dev, &s3c_pcm_dai[pdev->id]);
- if (ret != 0) {
- dev_err(&pdev->dev, "failed to get pcm_clock\n");
- goto err5;
- }
-
s3c_pcm_stereo_in[pdev->id].dma_addr = mem_res->start
+ S3C_PCM_RXFIFO;
s3c_pcm_stereo_out[pdev->id].dma_addr = mem_res->start
@@ -587,6 +581,12 @@ static __devinit int s3c_pcm_dev_probe(struct platform_device *pdev)
pcm->dma_capture = &s3c_pcm_stereo_in[pdev->id];
pcm->dma_playback = &s3c_pcm_stereo_out[pdev->id];
+ ret = snd_soc_register_dai(&pdev->dev, &s3c_pcm_dai[pdev->id]);
+ if (ret != 0) {
+ dev_err(&pdev->dev, "failed to get register DAI: %d\n", ret);
+ goto err5;
+ }
+
return 0;
err5: