[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20180803072016.21544-22-sjhuang@iluvatar.ai>
Date: Fri, 3 Aug 2018 15:19:51 +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 21/46] dmaengine: bam_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 err_unregister_dma
Signed-off-by: Huang Shijie <sjhuang@...vatar.ai>
---
drivers/dma/qcom/bam_dma.c | 7 ++-----
1 file changed, 2 insertions(+), 5 deletions(-)
diff --git a/drivers/dma/qcom/bam_dma.c b/drivers/dma/qcom/bam_dma.c
index 1617715aa6e0..d164892a8aa4 100644
--- a/drivers/dma/qcom/bam_dma.c
+++ b/drivers/dma/qcom/bam_dma.c
@@ -1332,7 +1332,7 @@ static int bam_dma_probe(struct platform_device *pdev)
bdev->common.device_tx_status = bam_tx_status;
bdev->common.dev = bdev->dev;
- ret = dma_async_device_register(&bdev->common);
+ ret = dmaenginem_async_device_register(&bdev->common);
if (ret) {
dev_err(bdev->dev, "failed to register dma async device\n");
goto err_bam_channel_exit;
@@ -1341,7 +1341,7 @@ static int bam_dma_probe(struct platform_device *pdev)
ret = of_dma_controller_register(pdev->dev.of_node, bam_dma_xlate,
&bdev->common);
if (ret)
- goto err_unregister_dma;
+ goto err_bam_channel_exit;
if (bdev->controlled_remotely) {
pm_runtime_disable(&pdev->dev);
@@ -1357,8 +1357,6 @@ static int bam_dma_probe(struct platform_device *pdev)
return 0;
-err_unregister_dma:
- dma_async_device_unregister(&bdev->common);
err_bam_channel_exit:
for (i = 0; i < bdev->num_channels; i++)
tasklet_kill(&bdev->channels[i].vc.task);
@@ -1378,7 +1376,6 @@ static int bam_dma_remove(struct platform_device *pdev)
pm_runtime_force_suspend(&pdev->dev);
of_dma_controller_free(pdev->dev.of_node);
- dma_async_device_unregister(&bdev->common);
/* mask all interrupts for this execution environment */
writel_relaxed(0, bam_addr(bdev, 0, BAM_IRQ_SRCS_MSK_EE));
--
2.17.1
Powered by blists - more mailing lists