Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp74060yba; Mon, 20 May 2019 05:15:23 -0700 (PDT) X-Google-Smtp-Source: APXvYqxSu3ZAyloZQhcbMFA90LsypzbK4sPE8TQI3X3KXEt6oilbgVrFQi02JCYsFR7PNY9L2yX5 X-Received: by 2002:a17:902:9f83:: with SMTP id g3mr59844214plq.330.1558354523529; Mon, 20 May 2019 05:15:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1558354523; cv=none; d=google.com; s=arc-20160816; b=CaCrxa7DpzGr7v+s0Txdt41PpncC1ML01ui/XWmJ2yrEobrf9M2ZXSNMeYvQt7m8LN 9Hzah7ug0FLbkBaz9bvXZV+GJG6Rk1mUMoPQa0Fsy/yHwHe1GDmTxOwjaTRqUBPQEHIZ 7v/DYErTnH/FK27DvN0ReVmIXvwfO0CRs2PI1Rwnfp6VBfflgVhMHObkRHXmCI0+7O6B o6JjiHezmiOg2XUoQTMMWAWaEhrUWmPngYvYMGAdWsnmIDbpQXVeVu3krSAOQJjxaFSh YV5cJh1xHHTYsz6MnKOAlM5wet9+ADDvsUxD2QaGEz1N2LsDARL7Oz2Kd6oQQIVPgSi+ aPCA== 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=S4gzzO6EwH6f41hdnpuqebXlIsK5G8TT4DFszJQHgV0=; b=koJ0+MBxeB46FlhGLPsrkmKNIahFjG4Xla75mK7dftDbN/azqU1XigibBVOjB9u1sY E+3fQWMK1ksX94fJBkUnv9H7gYmCMmyBjGW3Apd/DQM8HYrRpNgzzbmY81CfqUPNclMc 8nbUVCRgRbTfvo55pOu6d3S53YLA4L309ivxfOsEgzDDWH5hhNdZ0/SsjTQ3f5fWzcSW 4i4/Pa1e/+yOD1tgtVoxK1RaHOHjuZIVrilwl6jn636tGe1C8bf2bGugCMl9c7ZEvSjP 7p3tWFYGfi0GWU2JZ0NOI59BtJ4TXfS9QExwy/Fz0K+5M5VOUnSM3KfftS8a64f2nJnw 4oEQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=kGzjAWx0; 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 q13si17020831pll.162.2019.05.20.05.15.06; Mon, 20 May 2019 05:15:23 -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=kGzjAWx0; 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 S1732980AbfETLdG (ORCPT + 99 others); Mon, 20 May 2019 07:33:06 -0400 Received: from mail-pg1-f193.google.com ([209.85.215.193]:40561 "EHLO mail-pg1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732972AbfETLdG (ORCPT ); Mon, 20 May 2019 07:33:06 -0400 Received: by mail-pg1-f193.google.com with SMTP id d30so6670620pgm.7 for ; Mon, 20 May 2019 04:33:05 -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=S4gzzO6EwH6f41hdnpuqebXlIsK5G8TT4DFszJQHgV0=; b=kGzjAWx09b8i614qTj93eApuhAYdKFfSCQb0+hZtpocLm2MSIaH0rF9+HiZf0A+vcj DFTljdFN5pWcPxuYfUOJ68tQFKj30ZgtibGH2S3BXHbVCKNLZZhwrhp/XsRkXdFInukP Xjk9fWaCFqZJ8jZcXhR3aezzU8FJfnpD/f2ytgb8QX23t5dF/R+yuoTqXH0C0ZF9DjXK kK/Z6PNz6xn9BbWuEogWU+jIyoiUOisWLQVu90JBLpFdeKSeAFeaYkcaW1tllFwwnKdZ nJfsJF6cAcVhHJ/woNRx2z15cQYdmwdMhtceda3QpfeXnUfr/bh84yM2S2fBpXB8Pd1R Y6ZQ== 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=S4gzzO6EwH6f41hdnpuqebXlIsK5G8TT4DFszJQHgV0=; b=kE82bO7m2nhGyE5dV8MD53cGtqNV0orliJDh24HOJlwsLBh5tVeGsc2pISjhHmFbOI LbCSdjDlPUZxs6z8+YfG3OScVXaEQDtLxV3TNzlkK2CVXV4SSgKT5U1SlgDX6H82fYYz nrsVbGnwpNfqAcKM8GiKtbzZ9syqwiGd68jdWnR0ABNSHWOz2+1uVxb99j7eS58aehrT o1Cn347j7bsMsEDCgHRdbLzLDc4O7ojIxfqqp1AEJuT+gEXB0eYSaBzR0FY2hCwJe8zx UwXoK/5O2tjmkHgvHXfOWASSWuVCaYmKPQiE0jNwNMyUZNRUVTQJ5xmAAL6M6o0x15WL 8ijg== X-Gm-Message-State: APjAAAX1aHppyj/VsvlXV60J6tkqf0/v8kRCjGgSNolg+6M5LCklerdU NLxPm3XKEKL3tigqa4H8jNmgbA== X-Received: by 2002:a63:6cc5:: with SMTP id h188mr13909311pgc.105.1558351985496; Mon, 20 May 2019 04:33:05 -0700 (PDT) Received: from baolinwangubtpc.spreadtrum.com ([117.18.48.102]) by smtp.gmail.com with ESMTPSA id z124sm21310020pfz.116.2019.05.20.04.33.00 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 20 May 2019 04:33:05 -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, 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 v2 7/8] dmaengine: sh: rcar-dmac: Let the core do the device node validation Date: Mon, 20 May 2019 19:32:20 +0800 Message-Id: <6e544656cea22f93bdb2626620b381b00d1b38bf.1558351667.git.baolin.wang@linaro.org> 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(-) diff --git a/drivers/dma/sh/rcar-dmac.c b/drivers/dma/sh/rcar-dmac.c index 33ab1b6..67df54a 100644 --- a/drivers/dma/sh/rcar-dmac.c +++ b/drivers/dma/sh/rcar-dmac.c @@ -1654,8 +1654,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); @@ -1675,7 +1674,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; -- 1.7.9.5