Commit a4513320 authored by Sylwester Nawrocki's avatar Sylwester Nawrocki Committed by Mark Brown

ASoC: samsung: spdif: Fix DMA filter initialization

This patch fixes issues introduced in commit 73f5dfc6
"ASoC: samsung: get access to DMA engine early to defer probe properly"
and indicated by a following compilation warning:

  CC [M]  sound/soc/samsung/spdif.o
sound/soc/samsung/spdif.c: In function ‘spdif_probe’:
sound/soc/samsung/spdif.c:419:6: warning: ‘filter’ may be used uninitialized
in this function [-Wuninitialized]
Signed-off-by: default avatarSylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: default avatarMark Brown <broonie@kernel.org>
parent 73f5dfc6
...@@ -416,6 +416,15 @@ static int spdif_probe(struct platform_device *pdev) ...@@ -416,6 +416,15 @@ static int spdif_probe(struct platform_device *pdev)
goto err3; goto err3;
} }
spdif_stereo_out.addr_width = 2;
spdif_stereo_out.addr = mem_res->start + DATA_OUTBUF;
filter = NULL;
if (spdif_pdata) {
spdif_stereo_out.filter_data = spdif_pdata->dma_playback;
filter = spdif_pdata->dma_filter;
}
spdif->dma_playback = &spdif_stereo_out;
ret = samsung_asoc_dma_platform_register(&pdev->dev, filter, ret = samsung_asoc_dma_platform_register(&pdev->dev, filter,
NULL, NULL); NULL, NULL);
if (ret) { if (ret) {
...@@ -432,16 +441,6 @@ static int spdif_probe(struct platform_device *pdev) ...@@ -432,16 +441,6 @@ static int spdif_probe(struct platform_device *pdev)
goto err4; goto err4;
} }
spdif_stereo_out.addr_width = 2;
spdif_stereo_out.addr = mem_res->start + DATA_OUTBUF;
filter = NULL;
if (spdif_pdata) {
spdif_stereo_out.filter_data = spdif_pdata->dma_playback;
filter = spdif_pdata->dma_filter;
}
spdif->dma_playback = &spdif_stereo_out;
return 0; return 0;
err4: err4:
iounmap(spdif->regs); iounmap(spdif->regs);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment