lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20180803072016.21544-39-sjhuang@iluvatar.ai>
Date:   Fri,  3 Aug 2018 15:20:08 +0800
From:   Huang Shijie <sjhuang@...vatar.ai>
To:     vkoul@...nel.org
Cc:     dmaengine@...r.kernel.org, linux-kernel@...r.kernel.org,
        dave.jiang@...el.com, radhey.shyam.pandey@...inx.com,
        appana.durga.rao@...inx.com, jmkrzyszt@...il.com,
        gomonovych@...il.com, peter.ujfalusi@...com, keescook@...omium.org,
        horms+renesas@...ge.net.au, geert+renesas@...der.be,
        shawnguo@...nel.org, baoyou.xie@...aro.org,
        michal.simek@...inx.com, baohua@...nel.org,
        ludovic.desroches@...rochip.com, linus.walleij@...aro.org,
        david.brown@...aro.org, Huang Shijie <sjhuang@...vatar.ai>
Subject: [PATCH 38/46] dmaengine: imx-dma: use dmaenginem_async_device_register to simplify the code

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@...vatar.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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ