From patchwork Tue May 7 06:09:43 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: 163478 Delivered-To: patch@linaro.org Received: by 2002:a05:6e02:81:0:0:0:0 with SMTP id l1csp938092ilm; Mon, 6 May 2019 23:10:39 -0700 (PDT) X-Google-Smtp-Source: APXvYqwYWq+8K6xRgKgp6ndfp0wsKxFTiOdbNEnwzJah+X6n11WradDztKJH0o2khxuEmJgvtDQH X-Received: by 2002:a62:5653:: with SMTP id k80mr25789853pfb.144.1557209439813; Mon, 06 May 2019 23:10:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1557209439; cv=none; d=google.com; s=arc-20160816; b=dAzpnqudqL9Wda1UqXlD8JS6HRteb2ya44Hd/1gqcDfWv568qS4kQLuv5R+o9/+KsP ULxluit96egjzsbrJelwiaKQHnRjAqEa3R98vR0SN5XMy9kDV/DBzfk2qad7vNRs08HD GlUDhMWnaMZORg2l48FXXdUhisuhSKDf6b0ay1TIHLS3bLx4nGWYSpqRhhrHTvAbC/Xs GoG/Aa5JPMIkSBF2tCXBof1n+oV+hFncwOGtiPFediczhdAvE3OJNBqdp487hw/n9jog yxJ3eqQsSHepJsD9clpwufT0tsQH5Ds65G5qxMZDHhAxcbxEBBRawWM3vTjJbIeBZvAx aafw== 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=Ht0ALxJP7cHIgX2BFiAkk68306jKX66WjGg+0heuSHt3H1zv8cmKca/OFlUFMMk/A5 VRHEvsD5ps+9PQrN6S0P5Nz0iVd1cUnopUnuzYNHYR4X6x1oDrG68J7g1vEB1RZSpu3P rcBE6ZTIa6TpAnuEIXSpbGT2ll+Q1Jg9l/zORftRpVUjxoGUpN4049ELczx2do3qKs67 YauNNyle0v2K7DoeYRlrRKvBZECq7EWocIUyfpUB1s90FNzt6EqZDLpJMtb4BFx/6RvT JROsJgVl3dwtAttBB0XjE+Xmu5p327q5L65JuR2PMq0X0Ki0R+/VtsxSzk5ZQmo4MmEV joAw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=EPTCkX6P; 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 o188si4244522pgo.489.2019.05.06.23.10.39; Mon, 06 May 2019 23:10:39 -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=EPTCkX6P; 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 S1726400AbfEGGKj (ORCPT + 3 others); Tue, 7 May 2019 02:10:39 -0400 Received: from mail-pf1-f193.google.com ([209.85.210.193]:36810 "EHLO mail-pf1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726486AbfEGGKi (ORCPT ); Tue, 7 May 2019 02:10:38 -0400 Received: by mail-pf1-f193.google.com with SMTP id v80so8081709pfa.3 for ; Mon, 06 May 2019 23:10:38 -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=EPTCkX6PIWp6H6mHi0TmZyBHNTkNiDCOjwIvq4y+k7bAcUKgg+aAQYSeUiGtcEFhac uMQAb8Ce8bUqBZz0qzb3QD+1St8FT3LKJBOg2WJ79dLdgMiEnyhT6dED9GpA50HiDYXN g0cKvEmfcBjAZftLALFM6YJyyLCO2jGotOdpdiT+Jjqk4ZyUCejl/+4S7hjOJBIeAEgH EAM3+6a/PJghpLImXKKWgX2TNnpm0v9a0iYFb5ZHU9heUH6Nziw1o22ZNlXNQi/VzWyP yMjMvo3QcgAZii1n18z4Ol2nN+x5pdXG7MSREtWPwYDbLaQVwGa4WWigS7aVj5XMz8ac hXmQ== 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=odSiZxdGj1Uq3o/g83PfqFdHzAqxud8Ki0MeiJQgrntjMeKdI5gHjulY8t98Q1No9X Cy1+kSVNvZGzMJ4VJ3CMGCVaMwvY5WlIEYAx+Yr2z1gl0wMtV6zWghtOElK//pnkSnHK gk0TxsvJHaP1rc7XkgmVj1muaTV1AAgriPIQPXeSpOB+F0U71g9edH31tdIFzoLJPi6R 95O2OqbDddpYmDeuy3WGVmqrlqvl6C9EPHNwJhlJTcACqvODsAc+woOjeTws0X5ZSih0 Emp0czltyLs7DQ4cI/VRYbwQpjiE6LJ+XDivNlpaT7K9V5UhkpnKs/bsq7YjTYVkNyqo /xaQ== X-Gm-Message-State: APjAAAV3xbL5vFa8i1EP+w0W4MPkbUgHSoTmWQhX8tnEH8t6jfC/9xUb fbNE/Jve2S6rPgq3IyzFVGLK5w== X-Received: by 2002:aa7:90ca:: with SMTP id k10mr1280408pfk.20.1557209438341; Mon, 06 May 2019 23:10:38 -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.33 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 06 May 2019 23:10:37 -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 6/8] dmaengine: mxs-dma: Let the core do the device node validation Date: Tue, 7 May 2019 14:09:43 +0800 Message-Id: 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/mxs-dma.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) -- 1.7.9.5 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)