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 24/46] dmaengine: nbpfaxi: use dmaenginem_async_device_register to simplify the code
Date
Use dmaenginem_async_device_register to simplify the code:
remove dma_async_device_unregister.
remove label e_dma_dev_unreg

Signed-off-by: Huang Shijie <sjhuang@iluvatar.ai>
---
drivers/dma/nbpfaxi.c | 7 ++-----
1 file changed, 2 insertions(+), 5 deletions(-)

diff --git a/drivers/dma/nbpfaxi.c b/drivers/dma/nbpfaxi.c
index 8c7b2e8703da..def82e77f321 100644
--- a/drivers/dma/nbpfaxi.c
+++ b/drivers/dma/nbpfaxi.c
@@ -1437,18 +1437,16 @@ static int nbpf_probe(struct platform_device *pdev)

nbpf_configure(nbpf);

- ret = dma_async_device_register(dma_dev);
+ ret = dmaenginem_async_device_register(dma_dev);
if (ret < 0)
goto e_clk_off;

ret = of_dma_controller_register(np, nbpf_of_xlate, nbpf);
if (ret < 0)
- goto e_dma_dev_unreg;
+ goto e_clk_off;

return 0;

-e_dma_dev_unreg:
- dma_async_device_unregister(dma_dev);
e_clk_off:
clk_disable_unprepare(nbpf->clk);

@@ -1471,7 +1469,6 @@ static int nbpf_remove(struct platform_device *pdev)
}

of_dma_controller_free(pdev->dev.of_node);
- dma_async_device_unregister(&nbpf->dma_dev);
clk_disable_unprepare(nbpf->clk);

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