alsa-devel.alsa-project.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ASoC: samsung: spdif: Fix DMA filter initialization
@ 2016-11-02 11:03 Sylwester Nawrocki
  2016-11-02 18:26 ` Krzysztof Kozlowski
  0 siblings, 1 reply; 2+ messages in thread
From: Sylwester Nawrocki @ 2016-11-02 11:03 UTC (permalink / raw)
  To: broonie
  Cc: krzk, m.szyprowski, alsa-devel, linux-samsung-soc, sbkim73,
	Sylwester Nawrocki

This patch fixes issues introduced in commit 73f5dfc68316bef2ab7062ec
"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: Sylwester Nawrocki <s.nawrocki@samsung.com>
---
 sound/soc/samsung/spdif.c | 19 +++++++++----------
 1 file changed, 9 insertions(+), 10 deletions(-)

diff --git a/sound/soc/samsung/spdif.c b/sound/soc/samsung/spdif.c
index 704b7b1..779504f 100644
--- a/sound/soc/samsung/spdif.c
+++ b/sound/soc/samsung/spdif.c
@@ -416,6 +416,15 @@ static int spdif_probe(struct platform_device *pdev)
 		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,
 						 NULL, NULL);
 	if (ret) {
@@ -432,16 +441,6 @@ static int spdif_probe(struct platform_device *pdev)
 		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;
 err4:
 	iounmap(spdif->regs);
--
1.9.1

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] ASoC: samsung: spdif: Fix DMA filter initialization
  2016-11-02 11:03 [PATCH] ASoC: samsung: spdif: Fix DMA filter initialization Sylwester Nawrocki
@ 2016-11-02 18:26 ` Krzysztof Kozlowski
  0 siblings, 0 replies; 2+ messages in thread
From: Krzysztof Kozlowski @ 2016-11-02 18:26 UTC (permalink / raw)
  To: Sylwester Nawrocki
  Cc: broonie, krzk, m.szyprowski, alsa-devel, linux-samsung-soc,
	sbkim73

On Wed, Nov 02, 2016 at 12:03:03PM +0100, Sylwester Nawrocki wrote:
> This patch fixes issues introduced in commit 73f5dfc68316bef2ab7062ec
> "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: Sylwester Nawrocki <s.nawrocki@samsung.com>
> ---
>  sound/soc/samsung/spdif.c | 19 +++++++++----------
>  1 file changed, 9 insertions(+), 10 deletions(-)
>

Acked-by: Krzysztof Kozlowski <krzk@kernel.org>

Best regards,
Krzysztof

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2016-11-02 18:26 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-11-02 11:03 [PATCH] ASoC: samsung: spdif: Fix DMA filter initialization Sylwester Nawrocki
2016-11-02 18:26 ` Krzysztof Kozlowski

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).