diff mbox series

[40/46] dmaengine: fsl-edma: use dmaenginem_async_device_register to simplify the code

Message ID 20180803072016.21544-41-sjhuang@iluvatar.ai (mailing list archive)
State Changes Requested
Headers show
Series Use dmaenginem_async_device_register to simplify code | expand

Commit Message

Huang Shijie Aug. 3, 2018, 7:20 a.m. UTC
Use dmaenginem_async_device_register to simplify the code:
	remove dma_async_device_unregister.

Signed-off-by: Huang Shijie <sjhuang@iluvatar.ai>
---
 drivers/dma/fsl-edma.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
diff mbox series

Patch

diff --git a/drivers/dma/fsl-edma.c b/drivers/dma/fsl-edma.c
index c7568869284e..f475efce1d60 100644
--- a/drivers/dma/fsl-edma.c
+++ b/drivers/dma/fsl-edma.c
@@ -972,7 +972,7 @@  static int fsl_edma_probe(struct platform_device *pdev)
 
 	platform_set_drvdata(pdev, fsl_edma);
 
-	ret = dma_async_device_register(&fsl_edma->dma_dev);
+	ret = dmaenginem_async_device_register(&fsl_edma->dma_dev);
 	if (ret) {
 		dev_err(&pdev->dev,
 			"Can't register Freescale eDMA engine. (%d)\n", ret);
@@ -984,7 +984,6 @@  static int fsl_edma_probe(struct platform_device *pdev)
 	if (ret) {
 		dev_err(&pdev->dev,
 			"Can't register Freescale eDMA of_dma. (%d)\n", ret);
-		dma_async_device_unregister(&fsl_edma->dma_dev);
 		fsl_disable_clocks(fsl_edma, DMAMUX_NR);
 		return ret;
 	}
@@ -1014,7 +1013,6 @@  static int fsl_edma_remove(struct platform_device *pdev)
 	fsl_edma_irq_exit(pdev, fsl_edma);
 	fsl_edma_cleanup_vchan(&fsl_edma->dma_dev);
 	of_dma_controller_free(np);
-	dma_async_device_unregister(&fsl_edma->dma_dev);
 	fsl_disable_clocks(fsl_edma, DMAMUX_NR);
 
 	return 0;