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: 9408935 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 1C985601C2 for ; Wed, 2 Nov 2016 11:07:04 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0C7F829D21 for ; Wed, 2 Nov 2016 11:07:04 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id F0EE229D67; Wed, 2 Nov 2016 11:07:03 +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=-1.9 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1FFB229D21 for ; Wed, 2 Nov 2016 11:07:01 +0000 (UTC) Received: by alsa0.perex.cz (Postfix, from userid 1000) id 90961266B22; Wed, 2 Nov 2016 12:07:00 +0100 (CET) Received: from alsa0.perex.cz (localhost [127.0.0.1]) by alsa0.perex.cz (Postfix) with ESMTP id 934A6266B4B; Wed, 2 Nov 2016 12:04:35 +0100 (CET) X-Original-To: alsa-devel@alsa-project.org Delivered-To: alsa-devel@alsa-project.org Received: by alsa0.perex.cz (Postfix, from userid 1000) id 759A2266B17; Wed, 2 Nov 2016 12:03:22 +0100 (CET) Received: from mailout1.samsung.com (mailout1.samsung.com [203.254.224.24]) by alsa0.perex.cz (Postfix) with ESMTP id 359D82665E5 for ; Wed, 2 Nov 2016 12:03:15 +0100 (CET) MIME-version: 1.0 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 alsa-devel@alsa-project.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) 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 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 Cc: alsa-devel@alsa-project.org, linux-samsung-soc@vger.kernel.org, sbkim73@samsung.com, krzk@kernel.org, Sylwester Nawrocki , m.szyprowski@samsung.com Subject: [alsa-devel] [PATCH] ASoC: samsung: spdif: Fix DMA filter initialization X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: alsa-devel-bounces@alsa-project.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 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);