[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20180803072016.21544-21-sjhuang@iluvatar.ai>
Date: Fri, 3 Aug 2018 15:19:50 +0800
From: Huang Shijie <sjhuang@...vatar.ai>
To: vkoul@...nel.org
Cc: dmaengine@...r.kernel.org, linux-kernel@...r.kernel.org,
dave.jiang@...el.com, radhey.shyam.pandey@...inx.com,
appana.durga.rao@...inx.com, jmkrzyszt@...il.com,
gomonovych@...il.com, peter.ujfalusi@...com, keescook@...omium.org,
horms+renesas@...ge.net.au, geert+renesas@...der.be,
shawnguo@...nel.org, baoyou.xie@...aro.org,
michal.simek@...inx.com, baohua@...nel.org,
ludovic.desroches@...rochip.com, linus.walleij@...aro.org,
david.brown@...aro.org, Huang Shijie <sjhuang@...vatar.ai>
Subject: [PATCH 20/46] dmaengine: sirf-dma: use dmaenginem_async_device_register to simplify the code
Use dmaenginem_async_device_register to simplify the code:
remove dma_async_device_unregister.
remove label unreg_dma_dev
Signed-off-by: Huang Shijie <sjhuang@...vatar.ai>
---
drivers/dma/sirf-dma.c | 7 ++-----
1 file changed, 2 insertions(+), 5 deletions(-)
diff --git a/drivers/dma/sirf-dma.c b/drivers/dma/sirf-dma.c
index a0733ac3edb1..de19880d4254 100644
--- a/drivers/dma/sirf-dma.c
+++ b/drivers/dma/sirf-dma.c
@@ -944,7 +944,7 @@ static int sirfsoc_dma_probe(struct platform_device *op)
/* Register DMA engine */
dev_set_drvdata(dev, sdma);
- ret = dma_async_device_register(dma);
+ ret = dmaenginem_async_device_register(dma);
if (ret)
goto free_irq;
@@ -952,7 +952,7 @@ static int sirfsoc_dma_probe(struct platform_device *op)
ret = of_dma_controller_register(dn, of_dma_sirfsoc_xlate, sdma);
if (ret) {
dev_err(dev, "failed to register DMA controller\n");
- goto unreg_dma_dev;
+ goto free_irq;
}
pm_runtime_enable(&op->dev);
@@ -960,8 +960,6 @@ static int sirfsoc_dma_probe(struct platform_device *op)
return 0;
-unreg_dma_dev:
- dma_async_device_unregister(dma);
free_irq:
free_irq(sdma->irq, sdma);
irq_dispose:
@@ -975,7 +973,6 @@ static int sirfsoc_dma_remove(struct platform_device *op)
struct sirfsoc_dma *sdma = dev_get_drvdata(dev);
of_dma_controller_free(op->dev.of_node);
- dma_async_device_unregister(&sdma->dma);
free_irq(sdma->irq, sdma);
tasklet_kill(&sdma->tasklet);
irq_dispose_mapping(sdma->irq);
--
2.17.1
Powered by blists - more mailing lists