lkml.org 
[lkml]   [2018]   [Aug]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 31/46] dmaengine: moxart-dma: use dmaenginem_async_device_register to simplify the code
Date
Use dmaenginem_async_device_register to simplify the code:
remove dma_async_device_unregister.

Signed-off-by: Huang Shijie <sjhuang@iluvatar.ai>
---
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
\
 
 \ /
  Last update: 2018-08-03 09:25    [W:0.212 / U:3.952 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site