From patchwork Wed Nov 8 16:08:04 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mark Brown X-Patchwork-Id: 10048785 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 6478A60381 for ; Wed, 8 Nov 2017 16:25:01 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5989328716 for ; Wed, 8 Nov 2017 16:25:01 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 487A72A727; Wed, 8 Nov 2017 16:25:01 +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=-4.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_MED autolearn=unavailable version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id A4AF328716 for ; Wed, 8 Nov 2017 16:25:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:Date:Message-Id: In-Reply-To:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: References:List-Owner; bh=z8iqj6vU6eT51ruFv0ITA7dKOa79HENms/NPelQsJ5k=; b=JIm L7CGNMhJ/qbfrm3FCAcwJiIZNBButJGOTPZ14V8uHAeGrUferUQt7pqN7MYIfxxqPiuPvqD9ls6Fz t754nQltb0VEChLiVehVYJMywQoT5t8SumvcMgIK1IF7K1QMzVHIdBqlxXVDGZecm+lqV3ai3+npZ YyJyCAZKQ4UTZJwUXGxpxeriNlB7suvAzLCDpr+w1vX7bRQ6TfSiCoJA/hmYc18yNdk1xQA8OMSc0 tHEGCAI0rjOAA6vMosEvdluyIgzyhO0mJV4Jx05rvKny63S7hwsTy37r9lSjZwJ7csqV0F2jd+psT VlBRvUXfZeyqoTWse1ccqYk79cjmAbw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1eCT9w-00077u-25; Wed, 08 Nov 2017 16:25:00 +0000 Received: from casper.infradead.org ([2001:8b0:10b:1236::1]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1eCT9t-0006vS-5U for linux-arm-kernel@bombadil.infradead.org; Wed, 08 Nov 2017 16:24:57 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=Date:Message-Id:In-Reply-To:Subject:Cc: To:From:Sender:Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:References:List-Id:List-Help: List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=aopg04kDR/sbGDet2BLvyP/hye4BVPBjRlJJLsdBA8k=; b=p02ptNPfl9zTukSpcBgcLygjzv nEtwZlctGRUAjjosoI9rcM/gaDVE+j8+w0syLJNCrLJl92fUTO7JZ+TFLRN8Ol9v6SiSkRUkQswF1 eDhHVSTVrGL0gHbk0IOTGLIGXKdCfgvdaeHXopzpzRrR2E0Y2h9VA3SKZdEPN6ut8QOXKyH0N2oK6 TMgk/QmNXOzH9QP9F8gCusI0bTklBlKwmmZ+nLDlorhBIcIOT3sz8b6eSaztG10gv+F+eyQP9fIvL 2+tacFNG0fKzDzzl58kCsqa7xmxM6yQRUSSiHwBYqZjCemn1+Bnt0bIno0esAwRnIQeZNNjMiHx1L W+Mlsqjg==; Received: from heliosphere.sirena.org.uk ([2a01:7e01::f03c:91ff:fed4:a3b6]) by casper.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1eCSv3-0004MP-NZ for linux-arm-kernel@lists.infradead.org; Wed, 08 Nov 2017 16:09:40 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sirena.org.uk; s=20170815-heliosphere; h=Date:Message-Id:In-Reply-To: Subject:Cc:To:From:Sender:Reply-To:MIME-Version:Content-Type: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:References: List-Id:List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner: List-Archive; bh=aopg04kDR/sbGDet2BLvyP/hye4BVPBjRlJJLsdBA8k=; b=HM6E2ij3qxNm qmcYtcKoFJrxI22v5m5pDGBn88gnsfwRg+dFgLEXsTel5duoaM6q2jFDUShRdfeL1p2tHynScAMl6 Refa4mapRB8Q7oYPK/OBqBz0YiOIWED9cVK92C0kgd0hEnHx6ady4Nb7UvkuqZ+BSZ0Z7beHdpaRR bAYFc=; Received: from debutante.sirena.org.uk ([2001:470:1f1d:6b5::3] helo=debutante) by heliosphere.sirena.org.uk with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1eCStY-0003E7-Qb; Wed, 08 Nov 2017 16:08:04 +0000 Received: from broonie by debutante with local (Exim 4.89) (envelope-from ) id 1eCStY-0002Do-DQ; Wed, 08 Nov 2017 16:08:04 +0000 From: Mark Brown To: olivier moysan Subject: Applied "ASoC: stm32: spdifrx: fix control DMA error management" to the asoc tree In-Reply-To: <1509981533-28622-3-git-send-email-olivier.moysan@st.com> Message-Id: Date: Wed, 08 Nov 2017 16:08:04 +0000 X-Bad-Reply: In-Reply-To but no 'Re:' in Subject. X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20171108_160937_802647_D376E849 X-CRM114-Status: GOOD ( 17.72 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: mark.rutland@arm.com, robh@kernel.org, alsa-devel@alsa-project.org, olivier.moysan@st.com, alexandre.torgue@st.com, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, arnaud.pouliquen@st.com, tiwai@suse.com, lgirdwood@gmail.com, broonie@kernel.org, mcoquelin.stm32@gmail.com, benjamin.gaignard@st.com, perex@perex.cz, linux-arm-kernel@lists.infradead.org, kernel@stlinux.com MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP The patch ASoC: stm32: spdifrx: fix control DMA error management has been applied to the asoc tree at https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git All being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours) and sent to Linus during the next merge window (or sooner if it is a bug fix), however if problems are discovered then the patch may be dropped or reverted. You may get further e-mails resulting from automated or manual testing and review of the tree, please engage with people reporting problems and send followup patches addressing any issues that are reported if needed. If any updates are required or you are submitting further changes they should be sent as incremental updates against current git, existing patches will not be replaced. Please add any relevant lists and maintainers to the CCs when replying to this mail. Thanks, Mark From 98c8dc2fd59fdad77d26d7b0d7007776c5fbec16 Mon Sep 17 00:00:00 2001 From: olivier moysan Date: Mon, 6 Nov 2017 16:18:53 +0100 Subject: [PATCH] ASoC: stm32: spdifrx: fix control DMA error management Fix DMA channel request error handling. Signed-off-by: Olivier Moysan Signed-off-by: Mark Brown --- sound/soc/stm/stm32_spdifrx.c | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/sound/soc/stm/stm32_spdifrx.c b/sound/soc/stm/stm32_spdifrx.c index d7dbe84d5eeb..b9bdefcd3e10 100644 --- a/sound/soc/stm/stm32_spdifrx.c +++ b/sound/soc/stm/stm32_spdifrx.c @@ -392,6 +392,12 @@ static int stm32_spdifrx_dma_ctrl_register(struct device *dev, { int ret; + spdifrx->ctrl_chan = dma_request_chan(dev, "rx-ctrl"); + if (IS_ERR(spdifrx->ctrl_chan)) { + dev_err(dev, "dma_request_slave_channel failed\n"); + return PTR_ERR(spdifrx->ctrl_chan); + } + spdifrx->dmab = devm_kzalloc(dev, sizeof(struct snd_dma_buffer), GFP_KERNEL); if (!spdifrx->dmab) @@ -406,12 +412,6 @@ static int stm32_spdifrx_dma_ctrl_register(struct device *dev, return ret; } - spdifrx->ctrl_chan = dma_request_chan(dev, "rx-ctrl"); - if (!spdifrx->ctrl_chan) { - dev_err(dev, "dma_request_slave_channel failed\n"); - return -EINVAL; - } - spdifrx->slave_config.direction = DMA_DEV_TO_MEM; spdifrx->slave_config.src_addr = (dma_addr_t)(spdifrx->phys_addr + STM32_SPDIFRX_CSR); @@ -423,7 +423,6 @@ static int stm32_spdifrx_dma_ctrl_register(struct device *dev, &spdifrx->slave_config); if (ret < 0) { dev_err(dev, "dmaengine_slave_config returned error %d\n", ret); - dma_release_channel(spdifrx->ctrl_chan); spdifrx->ctrl_chan = NULL; } @@ -962,7 +961,7 @@ static int stm32_spdifrx_probe(struct platform_device *pdev) return 0; error: - if (spdifrx->ctrl_chan) + if (!IS_ERR(spdifrx->ctrl_chan)) dma_release_channel(spdifrx->ctrl_chan); if (spdifrx->dmab) snd_dma_free_pages(spdifrx->dmab);