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 36/46] dmaengine: k3dma: 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 of_dma_register_fail

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

diff --git a/drivers/dma/k3dma.c b/drivers/dma/k3dma.c
index 6bfa217ed6d0..5d9ab35b982d 100644
--- a/drivers/dma/k3dma.c
+++ b/drivers/dma/k3dma.c
@@ -902,14 +902,14 @@ static int k3_dma_probe(struct platform_device *op)

k3_dma_enable_dma(d, true);

- ret = dma_async_device_register(&d->slave);
+ ret = dmaenginem_async_device_register(&d->slave);
if (ret)
goto dma_async_register_fail;

ret = of_dma_controller_register((&op->dev)->of_node,
k3_of_dma_simple_xlate, d);
if (ret)
- goto of_dma_register_fail;
+ goto dma_async_register_fail;

spin_lock_init(&d->lock);
INIT_LIST_HEAD(&d->chan_pending);
@@ -919,8 +919,6 @@ static int k3_dma_probe(struct platform_device *op)

return 0;

-of_dma_register_fail:
- dma_async_device_unregister(&d->slave);
dma_async_register_fail:
clk_disable_unprepare(d->clk);
return ret;
@@ -931,7 +929,6 @@ static int k3_dma_remove(struct platform_device *op)
struct k3_dma_chan *c, *cn;
struct k3_dma_dev *d = platform_get_drvdata(op);

- dma_async_device_unregister(&d->slave);
of_dma_controller_free((&op->dev)->of_node);

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