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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20180803072016.21544-20-sjhuang@iluvatar.ai>
Date:   Fri,  3 Aug 2018 15:19:49 +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 19/46] dmaengine: sprd-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_register

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

diff --git a/drivers/dma/sprd-dma.c b/drivers/dma/sprd-dma.c
index 55df0d41355b..d06459d1f96f 100644
--- a/drivers/dma/sprd-dma.c
+++ b/drivers/dma/sprd-dma.c
@@ -943,7 +943,7 @@ static int sprd_dma_probe(struct platform_device *pdev)
 	if (ret < 0)
 		goto err_rpm;
 
-	ret = dma_async_device_register(&sdev->dma_dev);
+	ret = dmaenginem_async_device_register(&sdev->dma_dev);
 	if (ret < 0) {
 		dev_err(&pdev->dev, "register dma device failed:%d\n", ret);
 		goto err_register;
@@ -953,13 +953,11 @@ static int sprd_dma_probe(struct platform_device *pdev)
 	ret = of_dma_controller_register(np, of_dma_simple_xlate,
 					 &sprd_dma_info);
 	if (ret)
-		goto err_of_register;
+		goto err_register;
 
 	pm_runtime_put(&pdev->dev);
 	return 0;
 
-err_of_register:
-	dma_async_device_unregister(&sdev->dma_dev);
 err_register:
 	pm_runtime_put_noidle(&pdev->dev);
 	pm_runtime_disable(&pdev->dev);
@@ -989,7 +987,6 @@ static int sprd_dma_remove(struct platform_device *pdev)
 	}
 
 	of_dma_controller_free(pdev->dev.of_node);
-	dma_async_device_unregister(&sdev->dma_dev);
 	sprd_dma_disable(sdev);
 
 	pm_runtime_put_noidle(&pdev->dev);
-- 
2.17.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ