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

From: Huang Shijie
Date: Fri Aug 03 2018 - 03:23:06 EST


Use dmaenginem_async_device_register to simplify the code:
remove dma_async_device_unregister.

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

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;
--
2.17.1