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 13/46] dmaengine: sun4i-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_dma_unregister

Signed-off-by: Huang Shijie <sjhuang@iluvatar.ai>
---
drivers/dma/sun4i-dma.c | 7 ++-----
1 file changed, 2 insertions(+), 5 deletions(-)

diff --git a/drivers/dma/sun4i-dma.c b/drivers/dma/sun4i-dma.c
index f4ed3f17607c..c80a59c1fc38 100644
--- a/drivers/dma/sun4i-dma.c
+++ b/drivers/dma/sun4i-dma.c
@@ -1228,7 +1228,7 @@ static int sun4i_dma_probe(struct platform_device *pdev)
goto err_clk_disable;
}

- ret = dma_async_device_register(&priv->slave);
+ ret = dmaenginem_async_device_register(&priv->slave);
if (ret) {
dev_warn(&pdev->dev, "Failed to register DMA engine device\n");
goto err_clk_disable;
@@ -1238,15 +1238,13 @@ static int sun4i_dma_probe(struct platform_device *pdev)
priv);
if (ret) {
dev_err(&pdev->dev, "of_dma_controller_register failed\n");
- goto err_dma_unregister;
+ goto err_clk_disable;
}

dev_dbg(&pdev->dev, "Successfully probed SUN4I_DMA\n");

return 0;

-err_dma_unregister:
- dma_async_device_unregister(&priv->slave);
err_clk_disable:
clk_disable_unprepare(priv->clk);
return ret;
@@ -1260,7 +1258,6 @@ static int sun4i_dma_remove(struct platform_device *pdev)
disable_irq(priv->irq);

of_dma_controller_free(pdev->dev.of_node);
- dma_async_device_unregister(&priv->slave);

clk_disable_unprepare(priv->clk);

--
2.17.1
\
 
 \ /
  Last update: 2018-08-03 09:25    [W:0.179 / U:2.180 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site