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 4/8] dmaengine: dma-jz4780: Let the core do the device node validation
Date: Tue, 7 May 2019 14:09:41 +0800 [thread overview]
Message-ID: <0b8b0597623608bee186c573511be127ae5939c0.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/dma-jz4780.c | 7 ++-----
1 file changed, 2 insertions(+), 5 deletions(-)
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);
}
}
--
1.7.9.5
next prev 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 ` Baolin Wang [this message]
2019-05-07 6:09 ` [PATCH 5/8] dmaengine: mmp_tdma: " Baolin Wang
2019-05-07 6:09 ` [PATCH 6/8] dmaengine: mxs-dma: " Baolin Wang
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=0b8b0597623608bee186c573511be127ae5939c0.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 \
/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
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).