[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20180803072016.21544-13-sjhuang@iluvatar.ai>
Date: Fri, 3 Aug 2018 15:19:42 +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 12/46] dmaengine: sun6i-dma: use helper dmaenginem_async_device_register
Use dmaenginem_async_device_register to simplify the code:
remove dma_async_device_unregister
remove the label err_dma_unregister
Signed-off-by: Huang Shijie <sjhuang@...vatar.ai>
---
drivers/dma/sun6i-dma.c | 7 ++-----
1 file changed, 2 insertions(+), 5 deletions(-)
diff --git a/drivers/dma/sun6i-dma.c b/drivers/dma/sun6i-dma.c
index 0cd13f17fc11..419d6090f9e1 100644
--- a/drivers/dma/sun6i-dma.c
+++ b/drivers/dma/sun6i-dma.c
@@ -1319,7 +1319,7 @@ static int sun6i_dma_probe(struct platform_device *pdev)
goto err_clk_disable;
}
- ret = dma_async_device_register(&sdc->slave);
+ ret = dmaenginem_async_device_register(&sdc->slave);
if (ret) {
dev_warn(&pdev->dev, "Failed to register DMA engine device\n");
goto err_irq_disable;
@@ -1329,7 +1329,7 @@ static int sun6i_dma_probe(struct platform_device *pdev)
sdc);
if (ret) {
dev_err(&pdev->dev, "of_dma_controller_register failed\n");
- goto err_dma_unregister;
+ goto err_irq_disable;
}
if (sdc->cfg->clock_autogate_enable)
@@ -1337,8 +1337,6 @@ static int sun6i_dma_probe(struct platform_device *pdev)
return 0;
-err_dma_unregister:
- dma_async_device_unregister(&sdc->slave);
err_irq_disable:
sun6i_kill_tasklet(sdc);
err_clk_disable:
@@ -1355,7 +1353,6 @@ static int sun6i_dma_remove(struct platform_device *pdev)
struct sun6i_dma_dev *sdc = platform_get_drvdata(pdev);
of_dma_controller_free(pdev->dev.of_node);
- dma_async_device_unregister(&sdc->slave);
sun6i_kill_tasklet(sdc);
--
2.17.1
Powered by blists - more mailing lists