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 12/46] dmaengine: sun6i-dma: use helper dmaenginem_async_device_register
Date
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@iluvatar.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
\
 
 \ /
  Last update: 2018-08-03 09:26    [W:0.194 / U:2.588 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site