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 21/46] dmaengine: bam_dma: 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 err_unregister_dma

Signed-off-by: Huang Shijie <sjhuang@iluvatar.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
\
 
 \ /
  Last update: 2018-08-03 09:25    [W:0.196 / U:4.920 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site