Commit c88ba7b9 authored by Baolin Wang's avatar Baolin Wang Committed by Vinod Koul

dmaengine: dma-jz4780: Let the core do the device node validation

Let the DMA engine core do the device node validation instead of drivers.
Signed-off-by: default avatarBaolin Wang <baolin.wang@linaro.org>
Signed-off-by: default avatarVinod Koul <vkoul@kernel.org>
parent 990c0b53
...@@ -156,7 +156,6 @@ struct jz4780_dma_dev { ...@@ -156,7 +156,6 @@ struct jz4780_dma_dev {
}; };
struct jz4780_dma_filter_data { struct jz4780_dma_filter_data {
struct device_node *of_node;
uint32_t transfer_type; uint32_t transfer_type;
int channel; int channel;
}; };
...@@ -761,8 +760,6 @@ static bool jz4780_dma_filter_fn(struct dma_chan *chan, void *param) ...@@ -761,8 +760,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_dev *jzdma = jz4780_dma_chan_parent(jzchan);
struct jz4780_dma_filter_data *data = param; 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 > -1) {
if (data->channel != jzchan->id) if (data->channel != jzchan->id)
...@@ -786,7 +783,6 @@ static struct dma_chan *jz4780_of_dma_xlate(struct of_phandle_args *dma_spec, ...@@ -786,7 +783,6 @@ static struct dma_chan *jz4780_of_dma_xlate(struct of_phandle_args *dma_spec,
if (dma_spec->args_count != 2) if (dma_spec->args_count != 2)
return NULL; return NULL;
data.of_node = ofdma->of_node;
data.transfer_type = dma_spec->args[0]; data.transfer_type = dma_spec->args[0];
data.channel = dma_spec->args[1]; data.channel = dma_spec->args[1];
...@@ -811,7 +807,8 @@ static struct dma_chan *jz4780_of_dma_xlate(struct of_phandle_args *dma_spec, ...@@ -811,7 +807,8 @@ static struct dma_chan *jz4780_of_dma_xlate(struct of_phandle_args *dma_spec,
return dma_get_slave_channel( return dma_get_slave_channel(
&jzdma->chan[data.channel].vchan.chan); &jzdma->chan[data.channel].vchan.chan);
} else { } else {
return dma_request_channel(mask, jz4780_dma_filter_fn, &data); return __dma_request_channel(&mask, jz4780_dma_filter_fn, &data,
ofdma->of_node);
} }
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment