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 09/46] dmaengine: cppi41: 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/cppi41.c | 7 ++-----
1 file changed, 2 insertions(+), 5 deletions(-)

diff --git a/drivers/dma/ti/cppi41.c b/drivers/dma/ti/cppi41.c
index 1497da367710..d2998a19ed2e 100644
--- a/drivers/dma/ti/cppi41.c
+++ b/drivers/dma/ti/cppi41.c
@@ -1096,21 +1096,19 @@ static int cppi41_dma_probe(struct platform_device *pdev)
goto err_chans;
cdd->irq = irq;

- ret = dma_async_device_register(&cdd->ddev);
+ ret = dmaenginem_async_device_register(&cdd->ddev);
if (ret)
goto err_chans;

ret = of_dma_controller_register(dev->of_node,
cppi41_dma_xlate, &cpp41_dma_info);
if (ret)
- goto err_of;
+ goto err_chans;

pm_runtime_mark_last_busy(dev);
pm_runtime_put_autosuspend(dev);

return 0;
-err_of:
- dma_async_device_unregister(&cdd->ddev);
err_chans:
deinit_cppi41(dev, cdd);
err_init_cppi:
@@ -1132,7 +1130,6 @@ static int cppi41_dma_remove(struct platform_device *pdev)
dev_err(&pdev->dev, "%s could not pm_runtime_get: %i\n",
__func__, error);
of_dma_controller_free(pdev->dev.of_node);
- dma_async_device_unregister(&cdd->ddev);

devm_free_irq(&pdev->dev, cdd->irq, cdd);
deinit_cppi41(&pdev->dev, cdd);
--
2.17.1
\
 
 \ /
  Last update: 2018-08-03 09:23    [W:0.159 / U:1.204 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site