From patchwork Wed Nov 2 11:03:03 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: "Sylwester Nawrocki/Kernel \\(PLT\\) /SRPOL/Staff Engineer/Samsung Electronics" X-Patchwork-Id: 9408931 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id C2FAF601C2 for ; Wed, 2 Nov 2016 11:03:17 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id BFCB829B97 for ; Wed, 2 Nov 2016 11:03:17 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id B216429BBD; Wed, 2 Nov 2016 11:03:17 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 244D429B97 for ; Wed, 2 Nov 2016 11:03:17 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751154AbcKBLDQ (ORCPT ); Wed, 2 Nov 2016 07:03:16 -0400 Received: from mailout1.samsung.com ([203.254.224.24]:52536 "EHLO mailout1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750801AbcKBLDP (ORCPT ); Wed, 2 Nov 2016 07:03:15 -0400 MIME-version: 1.0 Content-type: text/plain; charset=UTF-8 Received: from epcpsbgm1new.samsung.com (epcpsbgm1 [203.254.230.26]) by mailout1.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTP id <0OG000O6SHDC8F50@mailout1.samsung.com> for linux-samsung-soc@vger.kernel.org; Wed, 02 Nov 2016 20:03:12 +0900 (KST) X-AuditID: cbfee61a-f79926d000005981-73-5819c7f06586 Received: from epmmp1.local.host ( [203.254.227.16]) by epcpsbgm1new.samsung.com (EPCPMTA) with SMTP id 7E.87.22913.0F7C9185; Wed, 2 Nov 2016 20:03:12 +0900 (KST) Content-transfer-encoding: 8BIT Received: from AMDC3061.digital.local ([106.116.147.40]) by mmp1.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTPA id <0OG0001RKHD57DB0@mmp1.samsung.com>; Wed, 02 Nov 2016 20:03:12 +0900 (KST) From: Sylwester Nawrocki To: broonie@kernel.org Cc: krzk@kernel.org, m.szyprowski@samsung.com, alsa-devel@alsa-project.org, linux-samsung-soc@vger.kernel.org, sbkim73@samsung.com, Sylwester Nawrocki Subject: [PATCH] ASoC: samsung: spdif: Fix DMA filter initialization Date: Wed, 02 Nov 2016 12:03:03 +0100 Message-id: <1478084583-30460-1-git-send-email-s.nawrocki@samsung.com> X-Mailer: git-send-email 1.9.1 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFprKIsWRmVeSWpSXmKPExsVy+t9jAd0PxyUjDO4+0LO4cvEQk8XUh0/Y LM6f38BuMeP8PiaLtUfuslscftPOanFxxRcmB3aPDZ+b2Dw2repk8+jbsorR4/MmuQCWKDeb jNTElNQihdS85PyUzLx0W6XQEDddCyWFvMTcVFulCF3fkCAlhbLEnFIgz8gADTg4B7gHK+nb JbhlzLh9lrGgm7fi//5DzA2MP7m6GDk5JARMJM539zFD2GISF+6tZwOxhQSWMkqceG0DYvMK CEr8mHyPpYuRg4NZQF7iyKVskDCzgLrEpHmLgFq5gMp/MUq8n7QMbA6bgKFE79E+RhBbBGjm 7TmdzBANmxklWlYlgdjCAi4Spy6eZgGxWQRUJT723WKE2OUm8fvxQnaIe+QkTh6bzDqBkW8W kjNmIZwxC8kZCxiZVzFKpBYkFxQnpeca5qWW6xUn5haX5qXrJefnbmIER8kzqR2MB3e5H2IU 4GBU4uGdsEQiQog1say4MvcQowQHs5II76rDkhFCvCmJlVWpRfnxRaU5qcWHGE2BbpzILCWa nA+M4LySeEMTcxNzYwMLc0tLEyMlcd7G2c/ChQTSE0tSs1NTC1KLYPqYODilGhjlZNds4DwQ w8cv/9/zZdZsLva189I6dadMnqFysWspt2Xh42LWfw/jHtgxrfux/djSRat2dx1T2fpTgbkk 9GJJYPuOGXumvF3sIX3UgfMdh2i643UeHoHy/Z3BYUv/aF1/u/iz5fYZ+Vl6TqK+Slf+5TVF f91iFmK+Tu5WUMSR+NTL30oCRS8psRRnJBpqMRcVJwIAuk6/eqgCAAA= X-MTR: 20000000000000000@CPGS Sender: linux-samsung-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-samsung-soc@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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 Acked-by: Krzysztof Kozlowski --- sound/soc/samsung/spdif.c | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) -- 1.9.1 -- To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html 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);