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]
Date:   Fri,  3 Aug 2018 15:19:40 +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 10/46] dmaengine: tegra210-adma: use helper dmaenginem_async_device_register

Use dmaenginem_async_device_register to simplify the code:
   remove dma_async_device_unregister
   remove the label dma_remove

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

diff --git a/drivers/dma/tegra210-adma.c b/drivers/dma/tegra210-adma.c
index b26256f23d67..bd99f12a00e3 100644
--- a/drivers/dma/tegra210-adma.c
+++ b/drivers/dma/tegra210-adma.c
@@ -746,7 +746,7 @@ static int tegra_adma_probe(struct platform_device *pdev)
 	tdma->dma_dev.directions = BIT(DMA_DEV_TO_MEM) | BIT(DMA_MEM_TO_DEV);
 	tdma->dma_dev.residue_granularity = DMA_RESIDUE_GRANULARITY_SEGMENT;
 
-	ret = dma_async_device_register(&tdma->dma_dev);
+	ret = dmaenginem_async_device_register(&tdma->dma_dev);
 	if (ret < 0) {
 		dev_err(&pdev->dev, "ADMA registration failed: %d\n", ret);
 		goto irq_dispose;
@@ -756,7 +756,7 @@ static int tegra_adma_probe(struct platform_device *pdev)
 					 tegra_dma_of_xlate, tdma);
 	if (ret < 0) {
 		dev_err(&pdev->dev, "ADMA OF registration failed %d\n", ret);
-		goto dma_remove;
+		goto irq_dispose;
 	}
 
 	pm_runtime_put(&pdev->dev);
@@ -766,8 +766,6 @@ static int tegra_adma_probe(struct platform_device *pdev)
 
 	return 0;
 
-dma_remove:
-	dma_async_device_unregister(&tdma->dma_dev);
 irq_dispose:
 	while (--i >= 0)
 		irq_dispose_mapping(tdma->channels[i].irq);
@@ -786,8 +784,6 @@ static int tegra_adma_remove(struct platform_device *pdev)
 	struct tegra_adma *tdma = platform_get_drvdata(pdev);
 	int i;
 
-	dma_async_device_unregister(&tdma->dma_dev);
-
 	for (i = 0; i < tdma->nr_channels; ++i)
 		irq_dispose_mapping(tdma->channels[i].irq);
 
-- 
2.17.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ