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 42/46] dmaengine: at_xdmac: 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/at_xdmac.c | 7 ++-----
1 file changed, 2 insertions(+), 5 deletions(-)

diff --git a/drivers/dma/at_xdmac.c b/drivers/dma/at_xdmac.c
index 4bf72561667c..c220f667be80 100644
--- a/drivers/dma/at_xdmac.c
+++ b/drivers/dma/at_xdmac.c
@@ -2041,7 +2041,7 @@ static int at_xdmac_probe(struct platform_device *pdev)
}
platform_set_drvdata(pdev, atxdmac);

- ret = dma_async_device_register(&atxdmac->dma);
+ ret = dmaenginem_async_device_register(&atxdmac->dma);
if (ret) {
dev_err(&pdev->dev, "fail to register DMA engine device\n");
goto err_clk_disable;
@@ -2051,7 +2051,7 @@ static int at_xdmac_probe(struct platform_device *pdev)
at_xdmac_xlate, atxdmac);
if (ret) {
dev_err(&pdev->dev, "could not register of dma controller\n");
- goto err_dma_unregister;
+ goto err_clk_disable;
}

dev_info(&pdev->dev, "%d channels, mapped at 0x%p\n",
@@ -2059,8 +2059,6 @@ static int at_xdmac_probe(struct platform_device *pdev)

return 0;

-err_dma_unregister:
- dma_async_device_unregister(&atxdmac->dma);
err_clk_disable:
clk_disable_unprepare(atxdmac->clk);
err_free_irq:
@@ -2075,7 +2073,6 @@ static int at_xdmac_remove(struct platform_device *pdev)

at_xdmac_off(atxdmac);
of_dma_controller_free(pdev->dev.of_node);
- dma_async_device_unregister(&atxdmac->dma);
clk_disable_unprepare(atxdmac->clk);

free_irq(atxdmac->irq, atxdmac);
--
2.17.1
\
 
 \ /
  Last update: 2018-08-03 09:24    [W:0.167 / U:0.828 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site