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 38/46] dmaengine: imx-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_of_dma_controller

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

diff --git a/drivers/dma/imx-dma.c b/drivers/dma/imx-dma.c
index 75b6ff0415ee..d651fbea77ee 100644
--- a/drivers/dma/imx-dma.c
+++ b/drivers/dma/imx-dma.c
@@ -1186,7 +1186,7 @@ static int __init imxdma_probe(struct platform_device *pdev)
imxdma->dma_device.dev->dma_parms = &imxdma->dma_parms;
dma_set_max_seg_size(imxdma->dma_device.dev, 0xffffff);

- ret = dma_async_device_register(&imxdma->dma_device);
+ ret = dmaenginem_async_device_register(&imxdma->dma_device);
if (ret) {
dev_err(&pdev->dev, "unable to register\n");
goto disable_dma_ahb_clk;
@@ -1197,14 +1197,12 @@ static int __init imxdma_probe(struct platform_device *pdev)
imxdma_xlate, imxdma);
if (ret) {
dev_err(&pdev->dev, "unable to register of_dma_controller\n");
- goto err_of_dma_controller;
+ goto disable_dma_ahb_clk;
}
}

return 0;

-err_of_dma_controller:
- dma_async_device_unregister(&imxdma->dma_device);
disable_dma_ahb_clk:
clk_disable_unprepare(imxdma->dma_ahb);
disable_dma_ipg_clk:
@@ -1237,8 +1235,6 @@ static int imxdma_remove(struct platform_device *pdev)

imxdma_free_irq(pdev, imxdma);

- dma_async_device_unregister(&imxdma->dma_device);
-
if (pdev->dev.of_node)
of_dma_controller_free(pdev->dev.of_node);

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