Skip to content

Commit

Permalink
dmaengine: mxs-dma: use dmaenginem_async_device_register to simplify …
Browse files Browse the repository at this point in the history
…the code

Use dmaenginem_async_device_register to simplify the code:
	remove dma_async_device_unregister.

Signed-off-by: Huang Shijie <sjhuang@iluvatar.ai>
Signed-off-by: Vinod Koul <vkoul@kernel.org>
  • Loading branch information
Huang Shijie authored and vinodkoul committed Aug 29, 2018
1 parent d72c5f9 commit fbb69ec
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions drivers/dma/mxs-dma.c
Original file line number Diff line number Diff line change
Expand Up @@ -847,7 +847,7 @@ static int __init mxs_dma_probe(struct platform_device *pdev)
mxs_dma->dma_device.residue_granularity = DMA_RESIDUE_GRANULARITY_BURST;
mxs_dma->dma_device.device_issue_pending = mxs_dma_enable_chan;

ret = dma_async_device_register(&mxs_dma->dma_device);
ret = dmaenginem_async_device_register(&mxs_dma->dma_device);
if (ret) {
dev_err(mxs_dma->dma_device.dev, "unable to register\n");
return ret;
Expand All @@ -857,7 +857,6 @@ static int __init mxs_dma_probe(struct platform_device *pdev)
if (ret) {
dev_err(mxs_dma->dma_device.dev,
"failed to register controller\n");
dma_async_device_unregister(&mxs_dma->dma_device);
}

dev_info(mxs_dma->dma_device.dev, "initialized\n");
Expand Down

0 comments on commit fbb69ec

Please sign in to comment.