[PATCH 24/46] dmaengine: nbpfaxi: 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 e_dma_dev_unreg

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

diff --git a/drivers/dma/nbpfaxi.c b/drivers/dma/nbpfaxi.c
index 8c7b2e8703da..def82e77f321 100644
--- a/drivers/dma/nbpfaxi.c
+++ b/drivers/dma/nbpfaxi.c
@@ -1437,18 +1437,16 @@ static int nbpf_probe(struct platform_device *pdev)
 
 	nbpf_configure(nbpf);
 
-	ret = dma_async_device_register(dma_dev);
+	ret = dmaenginem_async_device_register(dma_dev);
 	if (ret < 0)
 		goto e_clk_off;
 
 	ret = of_dma_controller_register(np, nbpf_of_xlate, nbpf);
 	if (ret < 0)
-		goto e_dma_dev_unreg;
+		goto e_clk_off;
 
 	return 0;
 
-e_dma_dev_unreg:
-	dma_async_device_unregister(dma_dev);
 e_clk_off:
 	clk_disable_unprepare(nbpf->clk);
 
@@ -1471,7 +1469,6 @@ static int nbpf_remove(struct platform_device *pdev)
 	}
 
 	of_dma_controller_free(pdev->dev.of_node);
-	dma_async_device_unregister(&nbpf->dma_dev);
 	clk_disable_unprepare(nbpf->clk);
 
 	return 0;
-- 
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