From patchwork Tue May 7 06:09:41 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: 163476 Delivered-To: patch@linaro.org Received: by 2002:a05:6e02:81:0:0:0:0 with SMTP id l1csp937953ilm; Mon, 6 May 2019 23:10:29 -0700 (PDT) X-Google-Smtp-Source: APXvYqzLqVxh1QJUWAt7njEX4XUGzRg6sNdcbLVnFYjGZe1fFbJR0hN9QrlmNs+VZ3YWFgBWtvgr X-Received: by 2002:a17:902:9a07:: with SMTP id v7mr38188798plp.291.1557209429646; Mon, 06 May 2019 23:10:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1557209429; cv=none; d=google.com; s=arc-20160816; b=Bqsdp9RtsfTS333aPvdCHbS/e7janSGM9SHEfriu4WbXQXofmVKQc2f8Gfo7/ymR63 Bb60xYTDdJ2XQ6IY//RRSW4j6nlSOvhDtGVy4kcXu/pJvkHiih9nFEhgXMvPOoIZVjko sNyZo5jgcRs7yR5YifeJcpDi3/OPH7cO1vz/PFROuptztRVvys8eKc9etuB+4CiMjviF ZIjCwYNlnkEZwgvdvOop2sIY1C62lUJCSfZmFPJtMXSD1vs7pvx7KG2BbFVY9Vxk3kob 6yqqpzC3JR4Ipyn4nlt19S1zxCLhrQc7XGjrULsfP6+JnmONBIi0xntJa0q+fdEc4vGj Hitg== 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=Cnx84NxIhSp4uZgqi6VSWZYaVNVqt10XSPlG8JL56aM=; b=eUvY8XpqABQwC9GKuoaNZ1xQdpGSYWsmA3dukRRvzUUbQi9k3Id51JJmi5vVuNr4Z+ ukXoB+TshOwWqTVwW9rT1nKi7wmXdlKlm/UVq0Al3yA0XI8Gvih/rvOmU/+bR8ACjhnl devIIf5VgfzXP9AeBEnvAc3+MJMjriL5EBTrTMAJCqI6P9SQ4/ymBuBwsZDShKMH4Q/E tYXjUBctInEgaqTU2sd00AIaQ2YC6vA3kkI8geuOArvevbw5cyduqcXMdrYkrDm7AT+2 iAQY51QnHQZAQvStl+qJrtNQ6XQ8qvS+Jm12seUtgK4LX9+5f72Hp9kHv6who3Ta+vcr izxQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=zcT6IdJy; spf=pass (google.com: best guess record for domain of dmaengine-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=dmaengine-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 e19si16940338pgv.63.2019.05.06.23.10.29; Mon, 06 May 2019 23:10:29 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of dmaengine-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=zcT6IdJy; spf=pass (google.com: best guess record for domain of dmaengine-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=dmaengine-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 S1726903AbfEGGK3 (ORCPT + 3 others); Tue, 7 May 2019 02:10:29 -0400 Received: from mail-pg1-f193.google.com ([209.85.215.193]:33605 "EHLO mail-pg1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726348AbfEGGK2 (ORCPT ); Tue, 7 May 2019 02:10:28 -0400 Received: by mail-pg1-f193.google.com with SMTP id h17so1752588pgv.0 for ; Mon, 06 May 2019 23:10:28 -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=Cnx84NxIhSp4uZgqi6VSWZYaVNVqt10XSPlG8JL56aM=; b=zcT6IdJyApB7KuMxuSWwG5peXYnsSHChNqw51B358ycUWDId/NngGMOqGHnT3h3bSm qChmgQ9pGa5Yu+EMHMNgnlyKYIB+8jttgce0QhMdtSj38lOgaDPhUawls09xh0d5XiU9 XcUQsGp7Ng6At2b8JIe5cM9Fi4JL9LcN1RY7mpjCslKb9GSOd5Mhf/HsE8HqngQ8riLP Tn/Gs+4flfKLlVDKesVK3VuGQZKXSUi+yaLrRL2c29XWNjnhW/3qUQ/1SZeyFjforxBc bUG3zRsnRVBy6oLxJo+88AKeAdIeoUpkW0hyt61HMVCFbY41ZhTb9Ur818qX/RjkvnlV 3E3g== 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=Cnx84NxIhSp4uZgqi6VSWZYaVNVqt10XSPlG8JL56aM=; b=tdYhahXJI1PGO8SJL9bUtadjzwe0qEaM0X1h9unC0ISUPVjYsAQIf/y6+55XMdwH5V RaDPpCcWaWDNFIMIZzeaet+a/srvJXiT7RydqCElXUimFhSWFARP6aRLuxzWNFPAgWeP L81Ro4ygK6X5NwQx1lXcgZuyyG1BtJ61KEJonGJF2H9Le742doPtlEucxqrtsl7uzt1p udyHdxsJEwpDdhDrgKkiqV+JKoF2L0dToD5hZ9WL1s7ESo2+46rym9+jBn9vOb90KeN1 lRzgEZkGty0z7oCo4UNjK6p6uQyuxltheiK5quZUMbA7zgqwB6ztIYAb+hGwznZezIGY BquQ== X-Gm-Message-State: APjAAAWItc/AJJxCJiCenvCgvdPA0GGdNx/f3LiOBMwkj5vPPFDCENl3 ga1CpLbZBCVKZs+hiHrvE1V+VA== X-Received: by 2002:a65:534b:: with SMTP id w11mr37576307pgr.210.1557209427968; Mon, 06 May 2019 23:10:27 -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.22 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 06 May 2019 23:10:27 -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 4/8] dmaengine: dma-jz4780: Let the core do the device node validation Date: Tue, 7 May 2019 14:09:41 +0800 Message-Id: <0b8b0597623608bee186c573511be127ae5939c0.1557206859.git.baolin.wang@linaro.org> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: References: In-Reply-To: References: Sender: dmaengine-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: dmaengine@vger.kernel.org Let the DMA engine core do the device node validation instead of drivers. Signed-off-by: Baolin Wang --- drivers/dma/dma-jz4780.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) -- 1.7.9.5 diff --git a/drivers/dma/dma-jz4780.c b/drivers/dma/dma-jz4780.c index 9ce0a38..7e1d381 100644 --- a/drivers/dma/dma-jz4780.c +++ b/drivers/dma/dma-jz4780.c @@ -160,7 +160,6 @@ struct jz4780_dma_dev { }; struct jz4780_dma_filter_data { - struct device_node *of_node; uint32_t transfer_type; int channel; }; @@ -765,8 +764,6 @@ static bool jz4780_dma_filter_fn(struct dma_chan *chan, void *param) struct jz4780_dma_dev *jzdma = jz4780_dma_chan_parent(jzchan); struct jz4780_dma_filter_data *data = param; - if (jzdma->dma_device.dev->of_node != data->of_node) - return false; if (data->channel > -1) { if (data->channel != jzchan->id) @@ -790,7 +787,6 @@ static struct dma_chan *jz4780_of_dma_xlate(struct of_phandle_args *dma_spec, if (dma_spec->args_count != 2) return NULL; - data.of_node = ofdma->of_node; data.transfer_type = dma_spec->args[0]; data.channel = dma_spec->args[1]; @@ -815,7 +811,8 @@ static struct dma_chan *jz4780_of_dma_xlate(struct of_phandle_args *dma_spec, return dma_get_slave_channel( &jzdma->chan[data.channel].vchan.chan); } else { - return dma_request_channel(mask, jz4780_dma_filter_fn, &data); + return __dma_request_channel(&mask, jz4780_dma_filter_fn, &data, + ofdma->of_node); } }