[PATCH 31/46] dmaengine: moxart-dma: use dmaenginem_async_device_register to simplify the code
From: Huang Shijie
Date: Fri Aug 03 2018 - 03:24:38 EST
Use dmaenginem_async_device_register to simplify the code:
remove dma_async_device_unregister.
Signed-off-by: Huang Shijie <sjhuang@xxxxxxxxxxx>
---
drivers/dma/moxart-dma.c | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/drivers/dma/moxart-dma.c b/drivers/dma/moxart-dma.c
index e04499c1f27f..80bff27c5f9b 100644
--- a/drivers/dma/moxart-dma.c
+++ b/drivers/dma/moxart-dma.c
@@ -618,7 +618,7 @@ static int moxart_probe(struct platform_device *pdev)
}
mdc->irq = irq;
- ret = dma_async_device_register(&mdc->dma_slave);
+ ret = dmaenginem_async_device_register(&mdc->dma_slave);
if (ret) {
dev_err(dev, "dma_async_device_register failed\n");
return ret;
@@ -627,7 +627,6 @@ static int moxart_probe(struct platform_device *pdev)
ret = of_dma_controller_register(node, moxart_of_xlate, mdc);
if (ret) {
dev_err(dev, "of_dma_controller_register failed\n");
- dma_async_device_unregister(&mdc->dma_slave);
return ret;
}
@@ -642,8 +641,6 @@ static int moxart_remove(struct platform_device *pdev)
devm_free_irq(&pdev->dev, m->irq, m);
- dma_async_device_unregister(&m->dma_slave);
-
if (pdev->dev.of_node)
of_dma_controller_free(pdev->dev.of_node);
--
2.17.1