Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp3358699yba; Mon, 6 May 2019 23:11:52 -0700 (PDT) X-Google-Smtp-Source: APXvYqyjsST3SNOXvY+5Ez5xjvYRkllp5GSGqPqyjCUOZKEgH/sf+fsIQdmtofzuCZk0STaQyevM X-Received: by 2002:a63:191b:: with SMTP id z27mr37766978pgl.327.1557209512550; Mon, 06 May 2019 23:11:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1557209512; cv=none; d=google.com; s=arc-20160816; b=lN2xvPZAYj9OifqXnwz+zK0VJCZZd6i39wVFiTalUQpZieso71kWQyH8aDpDF9dhWC ywKhNCae8DFlethGcy6TlDVcQIix0qZ16yCf8Rn/zVhhV1JGLZSfNFD/ecbICy9Drair Yq+3k/eqgDq8o8lCIF3RTi5wrWarjg0oQPnCR5PvIa2ZYmVyC1M9mpy0ZwZCDmb9gBe9 6Xr+ML5Yf2Z785c9Slu62ZvZlosrN4S8BgZvRoCLj3ANpo9eKgtZ8Xe337ZNhbP3bMmP 0c58Bp17UZQKNh52JTgr7E9oJ7Rbo40ZSbbty51l668QdTA3o4Ts/2O6R08wAGXFFiHE bOUw== 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=VqZnCOhaqUomzy5VdTuKBlwx7iYFociPD5PQrQJc/2JWxfih/IqJCwQf6p8mr2g0Lf y4qJQ9P8RXqPlpOcbg5bjvrbtVMPkTi9E0DD7R9G/CF0GC/J2hZ6WYHF2jeBAX03lvXk aQiBHDqA0vrjTbGDVzxMig7hZVk/bb6zRFzJig7Kw6ig3Me5Ywy5REdOYPOdmaoBTWvp sEIMCG2+RpYWDfeRd8/wpw5hMujoCeTThQbNB8G6fzMTog6QE4Dyb2YlO5dFLW6rZsxa egmLZmnrDr9SmkAvWHr9G80ImzvkCb+ck8gwxKkKkb/z2PG8Cp5viqcZjXkb1ZBju/Nh 8Whg== 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 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 q75si16982933pgq.386.2019.05.06.23.11.37; Mon, 06 May 2019 23:11:52 -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=EPTCkX6P; 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 S1727051AbfEGGKj (ORCPT + 99 others); Tue, 7 May 2019 02:10:39 -0400 Received: from mail-pg1-f196.google.com ([209.85.215.196]:37503 "EHLO mail-pg1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726386AbfEGGKj (ORCPT ); Tue, 7 May 2019 02:10:39 -0400 Received: by mail-pg1-f196.google.com with SMTP id e6so7736265pgc.4 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=mpVanc7tOL9ptBlTkaN5Tkjq9WAZACH4qxgLI3Ale1KheH5n3MEDnJu8xKMvc+Fg4F xDIcJDEdZoClc3EW5NQtUdU9bDckqCR5enhe6CmsKq9D2ugNSkyzvK3Nn78uPJgpTNHw w6zPDN8/Nf1ob9307TS94PKAPJa5F1IzBA1cmrCOSnRaZ5kYj0Ly4pUOMsaXDdZ2+zWy 0aYDPJhkwNnuQ3yNVWzMEBCKdMr5CiTTEaikLnFKv/3E2PB5m3vx0wMEAGu1NX5Svea8 LGx+DOS85qTFuga1XK+sGkTOZy46bW5vw4ZZCFwi3GgB7mVng1I1dPVl8VN0h7BYwicZ Z1PQ== X-Gm-Message-State: APjAAAX5Nzok5wWVJ6zXOznRPQkJ5EWMbF/PD+N06wWNwpqrjtMLD+ky W7DPAUbio5UjFUYS4+rj1bvu7Q== 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: 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