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-2-sjhuang@iluvatar.ai>
Date:   Fri,  3 Aug 2018 15:19:31 +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 01/46] dmaengine: zx_dma: use dmaenginem_async_device_register to simplify the code

Use dmaenginem_async_device_register() to simplify the code.
Remove the code calling dma_async_device_unregister().

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

diff --git a/drivers/dma/zx_dma.c b/drivers/dma/zx_dma.c
index 2571bc7693df..7febd20113ef 100644
--- a/drivers/dma/zx_dma.c
+++ b/drivers/dma/zx_dma.c
@@ -861,20 +861,18 @@ static int zx_dma_probe(struct platform_device *op)
 	INIT_LIST_HEAD(&d->chan_pending);
 	platform_set_drvdata(op, d);
 
-	ret = dma_async_device_register(&d->slave);
+	ret = dmaenginem_async_device_register(&d->slave);
 	if (ret)
 		goto clk_dis;
 
 	ret = of_dma_controller_register((&op->dev)->of_node,
 					 zx_of_dma_simple_xlate, d);
 	if (ret)
-		goto of_dma_register_fail;
+		goto clk_dis;
 
 	dev_info(&op->dev, "initialized\n");
 	return 0;
 
-of_dma_register_fail:
-	dma_async_device_unregister(&d->slave);
 clk_dis:
 	clk_disable_unprepare(d->clk);
 zx_dma_out:
@@ -889,7 +887,6 @@ static int zx_dma_remove(struct platform_device *op)
 	/* explictly free the irq */
 	devm_free_irq(&op->dev, d->irq, d);
 
-	dma_async_device_unregister(&d->slave);
 	of_dma_controller_free((&op->dev)->of_node);
 
 	list_for_each_entry_safe(c, cn, &d->slave.channels,
-- 
2.17.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ