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-40-sjhuang@iluvatar.ai>
Date:   Fri,  3 Aug 2018 15:20:09 +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 39/46] dmaengine: img-mdc-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 unregister

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

diff --git a/drivers/dma/img-mdc-dma.c b/drivers/dma/img-mdc-dma.c
index 25cec9c243e1..1e555ac62b1e 100644
--- a/drivers/dma/img-mdc-dma.c
+++ b/drivers/dma/img-mdc-dma.c
@@ -1001,21 +1001,19 @@ static int mdc_dma_probe(struct platform_device *pdev)
 			return ret;
 	}
 
-	ret = dma_async_device_register(&mdma->dma_dev);
+	ret = dmaenginem_async_device_register(&mdma->dma_dev);
 	if (ret)
 		goto suspend;
 
 	ret = of_dma_controller_register(pdev->dev.of_node, mdc_of_xlate, mdma);
 	if (ret)
-		goto unregister;
+		goto suspend;
 
 	dev_info(&pdev->dev, "MDC with %u channels and %u threads\n",
 		 mdma->nr_channels, mdma->nr_threads);
 
 	return 0;
 
-unregister:
-	dma_async_device_unregister(&mdma->dma_dev);
 suspend:
 	if (!pm_runtime_enabled(&pdev->dev))
 		img_mdc_runtime_suspend(&pdev->dev);
@@ -1029,7 +1027,6 @@ static int mdc_dma_remove(struct platform_device *pdev)
 	struct mdc_chan *mchan, *next;
 
 	of_dma_controller_free(pdev->dev.of_node);
-	dma_async_device_unregister(&mdma->dma_dev);
 
 	list_for_each_entry_safe(mchan, next, &mdma->dma_dev.channels,
 				 vc.chan.device_node) {
-- 
2.17.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ