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-14-sjhuang@iluvatar.ai>
Date:   Fri,  3 Aug 2018 15:19:43 +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 13/46] dmaengine: sun4i-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_dma_unregister

Signed-off-by: Huang Shijie <sjhuang@...vatar.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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ