[PATCH 10/46] dmaengine: tegra210-adma: use helper dmaenginem_async_device_register

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxx>
---
 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

--
To unsubscribe from this list: send the line "unsubscribe dmaengine" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Kernel]     [Linux ARM (vger)]     [Linux ARM MSM]     [Linux Omap]     [Linux Arm]     [Linux Tegra]     [Fedora ARM]     [Linux for Samsung SOC]     [eCos]     [Linux PCI]     [Linux Fastboot]     [Gcc Help]     [Git]     [DCCP]     [IETF Announce]     [Security]     [Linux MIPS]     [Yosemite Campsites]

  Powered by Linux