Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp182033yba; Mon, 20 May 2019 07:03:06 -0700 (PDT) X-Google-Smtp-Source: APXvYqzv6lL2mDqFJKpEymVVGaQV9+CbsKWLmE03aG9X9eMLFUl3aM9ulP1ghN+iIyKSnucVs83D X-Received: by 2002:a17:902:18b:: with SMTP id b11mr50848234plb.264.1558360986578; Mon, 20 May 2019 07:03:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1558360986; cv=none; d=google.com; s=arc-20160816; b=lZqLWlqx0cFx8EhcN5unVDGapy4Baj97mgtYn3CNeSWnOVYV43X+Y4JS7dtptWL0c2 XW7s8hi7qBnE4qeagtEIkoE1z8eeUYSF/KKkUPEOJlbVyqtEWkUq4q68QrcKGY9+sUE3 GrLJhPMDttg/hCflCQ92LwYqeigUSxQjLE+2LKa9tpZHuf48gzPHT1eTqtYtdrFjlwJV GiESC0B8SRci4Djqb4sGj0q7+0J2PqIjs3bNz5xI8/wKNHaEml5LXpEQCE9LPb3v7SnC AlsAOml3jGCyw4cLSuRLqdym5YPotNuXdHT7pMFj+4f25aRNT0sju89OIYv9knF4xqsR I0UQ== 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=MjWLMAdBW11KI57uPKHpmOc8QO2EQsc2Bw5TFtq2aeM=; b=r2iooqPtfB6gRXoGqo++F5dnQCSTYYxqlR5AKQYZ7V5GNGchC5BsPmDGs/RM0jYLwz +MbXqEakUUOzvRF0aAqpbRQJgtr018i5dJHQlk9KHbnv6rZClJiT56u5/RMrBypqLGky 0p/HmzRG0aw/52b8mY3irqxsF88l7YlX7DdsJ4f+BQroWhQNgnoTenI47xoEVR9vhy1X Gs7pbndmWzlqgERczOxK+ql2gZUu5evhyUy/c92v70WqfV3/jbr4xXRHUZamtpLg/Voo mK8NFGSJTNENOTSTiVZWEFRH2Sq/y/dnO20zFUk4hdFGdOpJEhZFDNe6011t5P++QNjO tH6w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=QlKJ6r1a; 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 127si17454979pgc.349.2019.05.20.07.02.49; Mon, 20 May 2019 07:03:06 -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=QlKJ6r1a; 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 S1732966AbfETLdB (ORCPT + 99 others); Mon, 20 May 2019 07:33:01 -0400 Received: from mail-pf1-f193.google.com ([209.85.210.193]:46982 "EHLO mail-pf1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732957AbfETLdB (ORCPT ); Mon, 20 May 2019 07:33:01 -0400 Received: by mail-pf1-f193.google.com with SMTP id y11so7074136pfm.13 for ; Mon, 20 May 2019 04:33:01 -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=MjWLMAdBW11KI57uPKHpmOc8QO2EQsc2Bw5TFtq2aeM=; b=QlKJ6r1aObcZ4e/504tulmS44XDtvOqWXOeJ7wgE1B+qEzdF8A6Ye8ybl6JSbXdowf Fbx4Y0P9D/5zijVUhbgS/2hpOtRgBIilgav6Fn3qZV4A3hbgw25/Rzxea6lEyHRrDxBu 0w+Jp7JdKp0vaJ1ZAHGJtNsZ195h2NaCgScaAnpZoqGbhRlItoawUBO+LTSL5fjnQC3r I03Bp6Fj4PFLvnYB8H8DaqWfJ4K4bfuNVzatgSU40EKQZzG31HCHatdZY3FPBK056x7r 4AMw+Z9y8lJiDFYI3oQodoGTmTvmu9ekhcWYEM4ei6PXFx2sADK/ZiIWk3YLrnnIpeu5 wUHA== 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=MjWLMAdBW11KI57uPKHpmOc8QO2EQsc2Bw5TFtq2aeM=; b=I5WR+rRuhPzakEeh38gaK8a6B+AFEx6KSFoyPtd0Wq368hGsk3dYqMO0nXBtHkWnJU T6Yayut9aYA50x9MIcacQYqL4JF6viEIf86rsO6ZxhLIDcuvEwFdDxTp/ZFzHa7hZBDv RTeLqpesgSESIADwbgVFBSJQwppHEuVDML89PH2qzkB7sISSUIk5fUMav+nFIQ9/9VE5 /X/p3j3yGzcjwwVKjrz2ydNxWxAp6UGLqYtuubd2YPlwYHjB+0qeLGtWpKoiM4RiXuCf Va1lBhXc3y7T+fy7ZYpkuQatVEVlL0VSW+jHQE2Xj4ILBVGP+3Kk7ufxJuzywm0DHSt0 W+4Q== X-Gm-Message-State: APjAAAVhZQtpkio5ikgQakKZufNG+Q3BfWE2I18kYCQCMfByfuBF9cCV HMlv7CPQK1dJMlBaCdKC/LRjNQ== X-Received: by 2002:a65:5302:: with SMTP id m2mr62317316pgq.369.1558351980703; Mon, 20 May 2019 04:33:00 -0700 (PDT) Received: from baolinwangubtpc.spreadtrum.com ([117.18.48.102]) by smtp.gmail.com with ESMTPSA id z124sm21310020pfz.116.2019.05.20.04.32.56 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 20 May 2019 04:33:00 -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 6/8] dmaengine: mxs-dma: Let the core do the device node validation Date: Mon, 20 May 2019 19:32:19 +0800 Message-Id: <15bd5303ecf61f3a3aacd0b078d13f042dea73c6.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/mxs-dma.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/drivers/dma/mxs-dma.c b/drivers/dma/mxs-dma.c index 22cc7f6..8ce5e79 100644 --- a/drivers/dma/mxs-dma.c +++ b/drivers/dma/mxs-dma.c @@ -716,7 +716,6 @@ static int __init mxs_dma_init(struct mxs_dma_engine *mxs_dma) } struct mxs_dma_filter_param { - struct device_node *of_node; unsigned int chan_id; }; @@ -727,9 +726,6 @@ static bool mxs_dma_filter_fn(struct dma_chan *chan, void *fn_param) struct mxs_dma_engine *mxs_dma = mxs_chan->mxs_dma; int chan_irq; - if (mxs_dma->dma_device.dev->of_node != param->of_node) - return false; - if (chan->chan_id != param->chan_id) return false; @@ -752,13 +748,13 @@ static struct dma_chan *mxs_dma_xlate(struct of_phandle_args *dma_spec, if (dma_spec->args_count != 1) return NULL; - param.of_node = ofdma->of_node; param.chan_id = dma_spec->args[0]; if (param.chan_id >= mxs_dma->nr_channels) return NULL; - return dma_request_channel(mask, mxs_dma_filter_fn, ¶m); + return __dma_request_channel(&mask, mxs_dma_filter_fn, ¶m, + ofdma->of_node); } static int __init mxs_dma_probe(struct platform_device *pdev) -- 1.7.9.5