LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Baolin Wang <baolin.wang@linaro.org>
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	[thread overview]
Message-ID: <c9b8865e869b4ca0bfcbaf04a997c4883dd8e15e.1557206859.git.baolin.wang@linaro.org> (raw)
In-Reply-To: <cover.1557206859.git.baolin.wang@linaro.org>
In-Reply-To: <cover.1557206859.git.baolin.wang@linaro.org>

Let the DMA engine core do the device node validation instead of drivers.

Signed-off-by: Baolin Wang <baolin.wang@linaro.org>
---
 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, &param);
+	return __dma_request_channel(&mask, mxs_dma_filter_fn, &param,
+				     ofdma->of_node);
 }
 
 static int __init mxs_dma_probe(struct platform_device *pdev)
-- 
1.7.9.5


  parent reply	other threads:[~2019-05-07  6:10 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-05-07  6:09 [PATCH 0/8] Add matching device node validation in DMA engine core Baolin Wang
2019-05-07  6:09 ` [PATCH 1/8] dmaengine: Add matching device node validation in __dma_request_channel() Baolin Wang
2019-05-07  8:37   ` Peter Ujfalusi
2019-05-20 11:27     ` Baolin Wang
2019-05-07  6:09 ` [PATCH 2/8] soc: tegra: fuse: Change to the correct __dma_request_channel() prototype Baolin Wang
2019-05-08 15:15   ` Dmitry Osipenko
2019-05-09  1:44     ` Baolin Wang
2019-05-07  6:09 ` [PATCH 3/8] dmaengine: imx-sdma: Let the core do the device node validation Baolin Wang
2019-05-07  6:09 ` [PATCH 4/8] dmaengine: dma-jz4780: " Baolin Wang
2019-05-07  6:09 ` [PATCH 5/8] dmaengine: mmp_tdma: " Baolin Wang
2019-05-07  6:09 ` Baolin Wang [this message]
2019-05-07  6:09 ` [PATCH 7/8] dmaengine: sh: rcar-dmac: " Baolin Wang
2019-05-07  6:09 ` [PATCH 8/8] dmaengine: sh: usb-dmac: " Baolin Wang

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=c9b8865e869b4ca0bfcbaf04a997c4883dd8e15e.1557206859.git.baolin.wang@linaro.org \
    --to=baolin.wang@linaro.org \
    --cc=Zubair.Kakakhel@imgtec.com \
    --cc=dan.j.williams@intel.com \
    --cc=dmaengine@vger.kernel.org \
    --cc=festevam@gmail.com \
    --cc=jonathanh@nvidia.com \
    --cc=jroedel@suse.de \
    --cc=kernel@pengutronix.de \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-imx@nxp.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-tegra@vger.kernel.org \
    --cc=s.hauer@pengutronix.de \
    --cc=shawnguo@kernel.org \
    --cc=thierry.reding@gmail.com \
    --cc=vincent.guittot@linaro.org \
    --cc=vkoul@kernel.org \
    --cc=wsa+renesas@sang-engineering.com \
    --subject='Re: [PATCH 6/8] dmaengine: mxs-dma: Let the core do the device node validation' \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).