From patchwork Fri Dec 13 23:16:23 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 22459 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-qe0-f70.google.com (mail-qe0-f70.google.com [209.85.128.70]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id C3A14202E2 for ; Fri, 13 Dec 2013 23:16:31 +0000 (UTC) Received: by mail-qe0-f70.google.com with SMTP id 6sf4664829qea.9 for ; Fri, 13 Dec 2013 15:16:31 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:cc:subject :date:message-id:x-original-sender:x-original-authentication-results :precedence:mailing-list:list-id:list-post:list-help:list-archive :list-unsubscribe; bh=7m70wqDPz9GDmT11+FI+ZHDFtehaAZHRHy5FN4icr9M=; b=f/Ydmh6uwdo/wNDFXnry5EVWQbcTc/a8aKHwcmhXoWBeiXTd+j6M7aSKOkyvTcNINq NLQ8/qP3QodZStDFZ2zHx4gn4YzEiKVIgzHoL0d94LrCFflubM3P1xKnQ4cGozVt/B1i vCQmKY6IhcSPBfoMDQG+3jhstmoR74+yLxE5T83xX/Rhy3PJxndM4D3MkUu1fEMgt6lk KVEexRPihVhepDxCF+4gLsHG7uE0TgKcT8j+V17KMwtCXy9rgZcGqUsvwkjUv+ruSvVB yWg010W3rqt1iTJQTpgg+r2+hsZvYgxd/QzlF4G7GHXfFwLRP7OesYPu3JbwO7qAm8vD Vjuw== X-Gm-Message-State: ALoCoQmAa2wGMfwwUcm8OV21f3JPps8+z5Xr73J92oeQhXg9F8X5IdNcVdjUHEF6VbY/xPeC+p5a X-Received: by 10.58.249.148 with SMTP id yu20mr305411vec.11.1386976591521; Fri, 13 Dec 2013 15:16:31 -0800 (PST) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.2.41 with SMTP id 9ls1177949qer.99.gmail; Fri, 13 Dec 2013 15:16:31 -0800 (PST) X-Received: by 10.52.249.105 with SMTP id yt9mr1901974vdc.67.1386976591437; Fri, 13 Dec 2013 15:16:31 -0800 (PST) Received: from mail-vb0-f50.google.com (mail-vb0-f50.google.com [209.85.212.50]) by mx.google.com with ESMTPS id gs2si1226969vdc.70.2013.12.13.15.16.31 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 13 Dec 2013 15:16:31 -0800 (PST) Received-SPF: neutral (google.com: 209.85.212.50 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.212.50; Received: by mail-vb0-f50.google.com with SMTP id w18so1758772vbj.37 for ; Fri, 13 Dec 2013 15:16:31 -0800 (PST) X-Received: by 10.58.100.244 with SMTP id fb20mr2272058veb.6.1386976591364; Fri, 13 Dec 2013 15:16:31 -0800 (PST) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patches@linaro.org Received: by 10.220.174.196 with SMTP id u4csp76226vcz; Fri, 13 Dec 2013 15:16:31 -0800 (PST) X-Received: by 10.112.158.231 with SMTP id wx7mr190371lbb.27.1386976590543; Fri, 13 Dec 2013 15:16:30 -0800 (PST) Received: from mail-la0-f50.google.com (mail-la0-f50.google.com [209.85.215.50]) by mx.google.com with ESMTPS id p10si1953866lag.46.2013.12.13.15.16.30 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 13 Dec 2013 15:16:30 -0800 (PST) Received-SPF: neutral (google.com: 209.85.215.50 is neither permitted nor denied by best guess record for domain of linus.walleij@linaro.org) client-ip=209.85.215.50; Received: by mail-la0-f50.google.com with SMTP id el20so1855716lab.37 for ; Fri, 13 Dec 2013 15:16:30 -0800 (PST) X-Received: by 10.112.50.15 with SMTP id y15mr174972lbn.57.1386976589960; Fri, 13 Dec 2013 15:16:29 -0800 (PST) Received: from localhost.localdomain (c83-254-151-69.bredband.comhem.se. [83.254.151.69]) by mx.google.com with ESMTPSA id t9sm8135135lat.1.2013.12.13.15.16.27 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 13 Dec 2013 15:16:28 -0800 (PST) From: Linus Walleij To: Vinod Koul Cc: linux-kernel@vger.kernel.org, Linus Walleij Subject: [PATCH 2/2] dma: pl08x: allow zero slave channels Date: Sat, 14 Dec 2013 00:16:23 +0100 Message-Id: <1386976583-31395-1-git-send-email-linus.walleij@linaro.org> X-Mailer: git-send-email 1.8.3.1 X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: linus.walleij@linaro.org X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.212.50 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Precedence: list Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org List-ID: X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , It might happen that a platform wants to use its DMA engine for memcpy only, and then we have zero slave channels to initialize, so allow the slave initialization to return zero. Signed-off-by: Linus Walleij --- drivers/dma/amba-pl08x.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/dma/amba-pl08x.c b/drivers/dma/amba-pl08x.c index ec4ee5c1fe9d..f68f1c1d560b 100644 --- a/drivers/dma/amba-pl08x.c +++ b/drivers/dma/amba-pl08x.c @@ -2167,7 +2167,7 @@ static int pl08x_probe(struct amba_device *adev, const struct amba_id *id) /* Register slave channels */ ret = pl08x_dma_init_virtual_channels(pl08x, &pl08x->slave, pl08x->pd->num_slave_channels, true); - if (ret <= 0) { + if (ret < 0) { dev_warn(&pl08x->adev->dev, "%s failed to enumerate slave channels - %d\n", __func__, ret);