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 08/46] dmaengine: edma: 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/ti/edma.c | 8 ++------
1 file changed, 2 insertions(+), 6 deletions(-)

diff --git a/drivers/dma/ti/edma.c b/drivers/dma/ti/edma.c
index ceabdea40ae0..28ba1e722c47 100644
--- a/drivers/dma/ti/edma.c
+++ b/drivers/dma/ti/edma.c
@@ -2388,18 +2388,17 @@ static int edma_probe(struct platform_device *pdev)
ecc->dma_slave.filter.mapcnt = info->slavecnt;
ecc->dma_slave.filter.fn = edma_filter_fn;

- ret = dma_async_device_register(&ecc->dma_slave);
+ ret = dmaenginem_async_device_register(&ecc->dma_slave);
if (ret) {
dev_err(dev, "slave ddev registration failed (%d)\n", ret);
goto err_reg1;
}

if (ecc->dma_memcpy) {
- ret = dma_async_device_register(ecc->dma_memcpy);
+ ret = dmaenginem_async_device_register(ecc->dma_memcpy);
if (ret) {
dev_err(dev, "memcpy ddev registration failed (%d)\n",
ret);
- dma_async_device_unregister(&ecc->dma_slave);
goto err_reg1;
}
}
@@ -2439,9 +2438,6 @@ static int edma_remove(struct platform_device *pdev)

if (dev->of_node)
of_dma_controller_free(dev->of_node);
- dma_async_device_unregister(&ecc->dma_slave);
- if (ecc->dma_memcpy)
- dma_async_device_unregister(ecc->dma_memcpy);
edma_free_slot(ecc, ecc->dummy_slot);

return 0;
--
2.17.1
\
 
 \ /
  Last update: 2018-08-03 09:26    [W:0.178 / U:8.476 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site