Commit fbb69ece authored by Huang Shijie's avatar Huang Shijie Committed by Vinod Koul
Browse files

dmaengine: mxs-dma: use dmaenginem_async_device_register to simplify the code



Use dmaenginem_async_device_register to simplify the code:
	remove dma_async_device_unregister.

Signed-off-by: default avatarHuang Shijie <sjhuang@iluvatar.ai>
Signed-off-by: default avatarVinod Koul <vkoul@kernel.org>
parent d72c5f98
Loading
Loading
Loading
Loading
+1 −2
Original line number Original line Diff line number Diff line
@@ -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.residue_granularity = DMA_RESIDUE_GRANULARITY_BURST;
	mxs_dma->dma_device.device_issue_pending = mxs_dma_enable_chan;
	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) {
	if (ret) {
		dev_err(mxs_dma->dma_device.dev, "unable to register\n");
		dev_err(mxs_dma->dma_device.dev, "unable to register\n");
		return ret;
		return ret;
@@ -857,7 +857,6 @@ static int __init mxs_dma_probe(struct platform_device *pdev)
	if (ret) {
	if (ret) {
		dev_err(mxs_dma->dma_device.dev,
		dev_err(mxs_dma->dma_device.dev,
			"failed to register controller\n");
			"failed to register controller\n");
		dma_async_device_unregister(&mxs_dma->dma_device);
	}
	}


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