From patchwork Tue May 7 06:09:44 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "\(Exiting\) Baolin Wang" X-Patchwork-Id: 163479 Delivered-To: patch@linaro.org Received: by 2002:a05:6e02:81:0:0:0:0 with SMTP id l1csp938205ilm; Mon, 6 May 2019 23:10:46 -0700 (PDT) X-Google-Smtp-Source: APXvYqwSKM6WnK+KRpZs9L/nePX9xCJ78uMps79pyStuh5VoS4Sfe0h2fTQ9tAgpfx0PcX3Vn6iC X-Received: by 2002:a17:902:8d83:: with SMTP id v3mr38187023plo.283.1557209446631; Mon, 06 May 2019 23:10:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1557209446; cv=none; d=google.com; s=arc-20160816; b=CjC5+HqUora3gFyAP0dEqGu27OpdK9YrIrF4iVay9ay3ivXeYd1sjHx3i1ziaImC+s v6aqec98uIZjqewprSQnPyPzfMZ233r3F/a2Jjpw1pEIOBUIGngdfgLTXbgVDkGKPv00 io2xV1M7seUJumBcIRQQfhW0VOOO1HbvTlNe3pQ2zpDm+JrXfwD33Ilp+G6RgDHs1LOU 8w543FjXCTt0MA1mHInytOJ5sEQoUpIlh2Z2reshQPLlff7UHnTU1wQ4JTohtyVfXHVx EP3ptuFGYbw6e1ZAy1Jah+t9ekBFzJjyrTYK9m/Op9n3pN0B0cC4vyUh8IrdT4bR4+rZ boFA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:references :in-reply-to:message-id:date:subject:cc:to:from:dkim-signature; bh=QS4oURfHIZFUpa7KdJQnPIiOEuTfxlscK4edcryrvp4=; b=Zv6FDcKeYM1xSTVSYeoTHIg7igaxy+xi7UQrgeroWc8+vHpvNfrxGQm1xNKZ3+Z6KY hi5ogKEWA1F2V3ErfUdu/S67ABiVqxEyBoMFBpQkjfKIL4eRr4mA//0yHNjr3u2X2UPT ZZ6fpftzfgwV4v5FPGylo/P155TlFmTjCYGpTJcU5Rej5nbEu7VAtu7K3xqKN2rLeasD J0DggFUQAo26YXaCXphY85r7/9Vo/s7ZIYRHK+4zjbipvUYIUGtDcvGixYxc7rvGlG5r qHJYzXcNtrNe8RFGordMsBUL9OPgTs7PtO7GJeh/dOWzGv5o5PMB/bGaJEVHk4fvCYLq 29zQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=maZFVIBN; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id x14si16921534pfm.179.2019.05.06.23.10.46; Mon, 06 May 2019 23:10:46 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=maZFVIBN; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727121AbfEGGKp (ORCPT + 30 others); Tue, 7 May 2019 02:10:45 -0400 Received: from mail-pg1-f196.google.com ([209.85.215.196]:33821 "EHLO mail-pg1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726386AbfEGGKo (ORCPT ); Tue, 7 May 2019 02:10:44 -0400 Received: by mail-pg1-f196.google.com with SMTP id c13so7743160pgt.1 for ; Mon, 06 May 2019 23:10:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :in-reply-to:references; bh=QS4oURfHIZFUpa7KdJQnPIiOEuTfxlscK4edcryrvp4=; b=maZFVIBNrGmfcQkxEh1uEEdXnaUgHkn3AsT3Rf/6klFaj6bfdmt1TliBoh7dY/CcSx YInGUoE9/OW4UzgCS1ptn9nWpJ97rk4CGoDlUcraSG3BFloczr+Y862nxym6+52jMg0z VIwqdFmTKB/etS/WqQfKc45L9vn2ZbxUpoSvWbYU0JTCOfaSy+jrOo47Hb3vNWNYuAA4 16TmzMN6uOMSc0NFoCSnkAm3i0sIMCtXl4saaqrFyn7gVT8BoIfXwfPQecLimNaDvq2z iuP/ykZ9Vpch7A1Z9HwQxiVZlsFLXcLjGq79ZTZy45jB9ERN2ejUJC9wkHSAv+p/yfXy D4XQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:in-reply-to:references; bh=QS4oURfHIZFUpa7KdJQnPIiOEuTfxlscK4edcryrvp4=; b=H/eLbhPZJy/YH/uGrXXrk0+ELiVteOv+kZQ7MNTDymhQcXnkRawC4vnXAFFk5EeIsI 0W0qvphYfau/YENWy+gMmEQU6fPSu33l4VSiQ2ifSJuUQ6wjrrw8KTwmG8xjcO2OjGhm Acx4nWgRk8p2dDJtgXoBVKUAcno3RuHo7BN7t85b119/DFi49jQOYZTLXDXPNmGaHpQW UcBxMjE9uhnp8QG0GwHlqUXVcanmisp9dgodvLo5nj5Ss3TW7pVpdvamR0igEKS9nahN X9+tuoruBiPow9rnJPsZRAoRN61qH7L/TGJ6zbgOfFmUyPo95DJV0wCFdn/bEAn3M5PQ d6rA== X-Gm-Message-State: APjAAAVahru177VHzgHqV7D7ChAN9jBkxfOWzhEIVTt3Ws/Zy9oMNRLr 8RYZ1ltHXQEBFfszr8/DHNnT2Q== X-Received: by 2002:a63:42:: with SMTP id 63mr37776526pga.337.1557209443520; Mon, 06 May 2019 23:10:43 -0700 (PDT) Received: from baolinwangubtpc.spreadtrum.com ([117.18.48.102]) by smtp.gmail.com with ESMTPSA id e184sm30786325pfc.102.2019.05.06.23.10.38 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 06 May 2019 23:10:42 -0700 (PDT) From: Baolin Wang To: dan.j.williams@intel.com, vkoul@kernel.org Cc: thierry.reding@gmail.com, jonathanh@nvidia.com, linux-tegra@vger.kernel.org, shawnguo@kernel.org, s.hauer@pengutronix.de, kernel@pengutronix.de, festevam@gmail.com, linux-imx@nxp.com, Zubair.Kakakhel@imgtec.com, wsa+renesas@sang-engineering.com, jroedel@suse.de, vincent.guittot@linaro.org, baolin.wang@linaro.org, dmaengine@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH 7/8] dmaengine: sh: rcar-dmac: Let the core do the device node validation Date: Tue, 7 May 2019 14:09:44 +0800 Message-Id: X-Mailer: git-send-email 1.7.9.5 In-Reply-To: References: In-Reply-To: References: Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Let the DMA engine core do the device node validation instead of drivers. Signed-off-by: Baolin Wang --- drivers/dma/sh/rcar-dmac.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) -- 1.7.9.5 diff --git a/drivers/dma/sh/rcar-dmac.c b/drivers/dma/sh/rcar-dmac.c index 2b4f256..9474d5b 100644 --- a/drivers/dma/sh/rcar-dmac.c +++ b/drivers/dma/sh/rcar-dmac.c @@ -1632,8 +1632,7 @@ static bool rcar_dmac_chan_filter(struct dma_chan *chan, void *arg) * Forcing it to call dma_request_channel() and iterate through all * channels from all controllers is just pointless. */ - if (chan->device->device_config != rcar_dmac_device_config || - dma_spec->np != chan->device->dev->of_node) + if (chan->device->device_config != rcar_dmac_device_config) return false; return !test_and_set_bit(dma_spec->args[0], dmac->modules); @@ -1653,7 +1652,8 @@ static struct dma_chan *rcar_dmac_of_xlate(struct of_phandle_args *dma_spec, dma_cap_zero(mask); dma_cap_set(DMA_SLAVE, mask); - chan = dma_request_channel(mask, rcar_dmac_chan_filter, dma_spec); + chan = __dma_request_channel(&mask, rcar_dmac_chan_filter, dma_spec, + ofdma->of_node); if (!chan) return NULL;