1
0
Fork 0

Merge remote-tracking branch 'origin/dma/mxsdma' into dma/next

* origin/dma/mxsdma:
  dma: mxs-dma: change the way to register the probe function
  MLK-19897: dma: mxs-dma: filter out the unrelated dma channels
5.4-rM2-2.2.x-imx-squashed
Dong Aisheng 2019-12-02 18:01:14 +08:00
commit 484805c54b
1 changed files with 9 additions and 7 deletions

View File

@ -729,6 +729,12 @@ 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 (strcmp(chan->device->dev->driver->name, "mxs-dma"))
return false;
if (!mxs_dma)
return false;
if (chan->chan_id != param->chan_id)
return false;
@ -760,7 +766,7 @@ static struct dma_chan *mxs_dma_xlate(struct of_phandle_args *dma_spec,
ofdma->of_node);
}
static int __init mxs_dma_probe(struct platform_device *pdev)
static int mxs_dma_probe(struct platform_device *pdev)
{
struct device_node *np = pdev->dev.of_node;
const struct platform_device_id *id_entry;
@ -869,10 +875,6 @@ static struct platform_driver mxs_dma_driver = {
.of_match_table = mxs_dma_dt_ids,
},
.id_table = mxs_dma_ids,
.probe = mxs_dma_probe,
};
static int __init mxs_dma_module_init(void)
{
return platform_driver_probe(&mxs_dma_driver, mxs_dma_probe);
}
subsys_initcall(mxs_dma_module_init);
module_platform_driver(mxs_dma_driver);