[PATCH 20/46] dmaengine: sirf-dma: use dmaenginem_async_device_register to simplify the code

[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 label unreg_dma_dev

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

diff --git a/drivers/dma/sirf-dma.c b/drivers/dma/sirf-dma.c
index a0733ac3edb1..de19880d4254 100644
--- a/drivers/dma/sirf-dma.c
+++ b/drivers/dma/sirf-dma.c
@@ -944,7 +944,7 @@ static int sirfsoc_dma_probe(struct platform_device *op)
 	/* Register DMA engine */
 	dev_set_drvdata(dev, sdma);
 
-	ret = dma_async_device_register(dma);
+	ret = dmaenginem_async_device_register(dma);
 	if (ret)
 		goto free_irq;
 
@@ -952,7 +952,7 @@ static int sirfsoc_dma_probe(struct platform_device *op)
 	ret = of_dma_controller_register(dn, of_dma_sirfsoc_xlate, sdma);
 	if (ret) {
 		dev_err(dev, "failed to register DMA controller\n");
-		goto unreg_dma_dev;
+		goto free_irq;
 	}
 
 	pm_runtime_enable(&op->dev);
@@ -960,8 +960,6 @@ static int sirfsoc_dma_probe(struct platform_device *op)
 
 	return 0;
 
-unreg_dma_dev:
-	dma_async_device_unregister(dma);
 free_irq:
 	free_irq(sdma->irq, sdma);
 irq_dispose:
@@ -975,7 +973,6 @@ static int sirfsoc_dma_remove(struct platform_device *op)
 	struct sirfsoc_dma *sdma = dev_get_drvdata(dev);
 
 	of_dma_controller_free(op->dev.of_node);
-	dma_async_device_unregister(&sdma->dma);
 	free_irq(sdma->irq, sdma);
 	tasklet_kill(&sdma->tasklet);
 	irq_dispose_mapping(sdma->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