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 01/46] dmaengine: zx_dma: use dmaenginem_async_device_register to simplify the code
Date
Use dmaenginem_async_device_register() to simplify the code.
Remove the code calling dma_async_device_unregister().

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

diff --git a/drivers/dma/zx_dma.c b/drivers/dma/zx_dma.c
index 2571bc7693df..7febd20113ef 100644
--- a/drivers/dma/zx_dma.c
+++ b/drivers/dma/zx_dma.c
@@ -861,20 +861,18 @@ static int zx_dma_probe(struct platform_device *op)
INIT_LIST_HEAD(&d->chan_pending);
platform_set_drvdata(op, d);

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

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

dev_info(&op->dev, "initialized\n");
return 0;

-of_dma_register_fail:
- dma_async_device_unregister(&d->slave);
clk_dis:
clk_disable_unprepare(d->clk);
zx_dma_out:
@@ -889,7 +887,6 @@ static int zx_dma_remove(struct platform_device *op)
/* explictly free the irq */
devm_free_irq(&op->dev, d->irq, d);

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

list_for_each_entry_safe(c, cn, &d->slave.channels,
--
2.17.1
\
 
 \ /
  Last update: 2018-08-03 09:22    [W:0.195 / U:8.200 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site