From patchwork Tue Dec 13 13:40:43 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: M'boumba Cedric Madianga X-Patchwork-Id: 9472307 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 1DB146021C for ; Tue, 13 Dec 2016 13:43:33 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 125BF284AE for ; Tue, 13 Dec 2016 13:43:33 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 073CF2851B; Tue, 13 Dec 2016 13:43:33 +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.8 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, T_DKIM_INVALID 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 9C866284AE for ; Tue, 13 Dec 2016 13:43:32 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933024AbcLMNnc (ORCPT ); Tue, 13 Dec 2016 08:43:32 -0500 Received: from mail-wj0-f194.google.com ([209.85.210.194]:36528 "EHLO mail-wj0-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933030AbcLMNlF (ORCPT ); Tue, 13 Dec 2016 08:41:05 -0500 Received: by mail-wj0-f194.google.com with SMTP id j10so16640069wjb.3; Tue, 13 Dec 2016 05:41:04 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=U0XMl3tP/v/GR2PV/3U8gG2CFxVxVgVia+bVfMxpmnk=; b=q0DL/RglVB2//uHAl2sfOdfv/UzTQVHvDKtACReQ7li+UHzvfBjDnmkH87zOF6Rr71 Z2MifTEHPPcZhukDE9OpgmkH0eClK5qDcqyAMHJo2XoO0V59V3khK1A9Lp0CC1G157Xu M3ySsF4myIZjy7Gls1tFn3wj9HPP/uOqw6nMGVzxaGC1hH++g8xlKQPAoA43JppqRoER kqide4ZLT3PxgZht4xHuUlGbZeMdSUZs+3bm9hCoGrRo8TuS3A5a4eUXoiINVyWc7nPd bol6bpz4kJzFn5q64hWXbRrF8QD1vGAbCSGHXyhe4209jHpTykkKBdjU0vQnAkvz9pqp oK3Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=U0XMl3tP/v/GR2PV/3U8gG2CFxVxVgVia+bVfMxpmnk=; b=KwLXe/dRUA2W7ZBgi0SoCSbq1eq/iSaX6196/C5JH81cBkL5DvXG7sTSMaUJLHx2iK 1GKbrfiIHK4T1RtZghgGBBfSHSuH2Xr648/MDZtRVRXN+n1fqf0NdBvM4L1r3x6kNBPu rJqtUFLUICxdG49tSUHEH1w7ZT08u66n0xEteHBJoO5I3x2xL/sEurZpIF7IyekNGU02 3WFsZgGIEu/ijxBGAJjnGfRYRBu5FEoHIeUz8UYpNMoL0mN2zAe5uOtl1hVGdFtr1CF/ G5QonoD5r5TZqF5dowknEx0Js1TzoIQLgChOYaQuM0EHKJsfyNvb7Xryo5mZR1/qlh5e Dzdg== X-Gm-Message-State: AKaTC03VswymKUcwrcluqX2pDOhqB38MTgPo5pu3XbcJSWnZ6Wt4hGudo5d9aMZNM4zq1A== X-Received: by 10.194.43.73 with SMTP id u9mr84328231wjl.109.1481636463682; Tue, 13 Dec 2016 05:41:03 -0800 (PST) Received: from lmenx29w.st.com. ([80.215.199.148]) by smtp.gmail.com with ESMTPSA id vr9sm62269846wjc.35.2016.12.13.05.41.01 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 13 Dec 2016 05:41:03 -0800 (PST) From: M'boumba Cedric Madianga To: vinod.koul@intel.com, robh+dt@kernel.org, mark.rutland@arm.com, mcoquelin.stm32@gmail.com, alexandre.torgue@st.com, dan.j.williams@intel.com, dmaengine@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Cc: M'boumba Cedric Madianga Subject: [PATCH 1/9] dmaengine: stm32-dma: Set correct args number for DMA request from DT Date: Tue, 13 Dec 2016 14:40:43 +0100 Message-Id: <1481636451-27863-2-git-send-email-cedric.madianga@gmail.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1481636451-27863-1-git-send-email-cedric.madianga@gmail.com> References: <1481636451-27863-1-git-send-email-cedric.madianga@gmail.com> Sender: dmaengine-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: dmaengine@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP This patch sets the right number of arguments to be used for DMA clients which request channels from DT. Signed-off-by: M'boumba Cedric Madianga Reviewed-by: Ludovic BARRE --- drivers/dma/stm32-dma.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/drivers/dma/stm32-dma.c b/drivers/dma/stm32-dma.c index 3688d08..a884b85 100644 --- a/drivers/dma/stm32-dma.c +++ b/drivers/dma/stm32-dma.c @@ -972,21 +972,18 @@ static struct dma_chan *stm32_dma_of_xlate(struct of_phandle_args *dma_spec, struct stm32_dma_chan *chan; struct dma_chan *c; - if (dma_spec->args_count < 3) + if (dma_spec->args_count < 4) return NULL; cfg.channel_id = dma_spec->args[0]; cfg.request_line = dma_spec->args[1]; cfg.stream_config = dma_spec->args[2]; - cfg.threshold = 0; + cfg.threshold = dma_spec->args[3]; if ((cfg.channel_id >= STM32_DMA_MAX_CHANNELS) || (cfg.request_line >= STM32_DMA_MAX_REQUEST_ID)) return NULL; - if (dma_spec->args_count > 3) - cfg.threshold = dma_spec->args[3]; - chan = &dmadev->chan[cfg.channel_id]; c = dma_get_slave_channel(&chan->vchan.chan);