[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20180803072016.21544-46-sjhuang@iluvatar.ai>
Date: Fri, 3 Aug 2018 15:20:15 +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 45/46] dmaengine: dma-axi-dmac: 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 err_unregister_device
Signed-off-by: Huang Shijie <sjhuang@...vatar.ai>
---
drivers/dma/dma-axi-dmac.c | 7 ++-----
1 file changed, 2 insertions(+), 5 deletions(-)
diff --git a/drivers/dma/dma-axi-dmac.c b/drivers/dma/dma-axi-dmac.c
index 15b2453d2647..d510184762e6 100644
--- a/drivers/dma/dma-axi-dmac.c
+++ b/drivers/dma/dma-axi-dmac.c
@@ -678,14 +678,14 @@ static int axi_dmac_probe(struct platform_device *pdev)
axi_dmac_write(dmac, AXI_DMAC_REG_IRQ_MASK, 0x00);
- ret = dma_async_device_register(dma_dev);
+ ret = dmaenginem_async_device_register(dma_dev);
if (ret)
goto err_clk_disable;
ret = of_dma_controller_register(pdev->dev.of_node,
of_dma_xlate_by_chan_id, dma_dev);
if (ret)
- goto err_unregister_device;
+ goto err_clk_disable;
ret = request_irq(dmac->irq, axi_dmac_interrupt_handler, IRQF_SHARED,
dev_name(&pdev->dev), dmac);
@@ -698,8 +698,6 @@ static int axi_dmac_probe(struct platform_device *pdev)
err_unregister_of:
of_dma_controller_free(pdev->dev.of_node);
-err_unregister_device:
- dma_async_device_unregister(&dmac->dma_dev);
err_clk_disable:
clk_disable_unprepare(dmac->clk);
@@ -713,7 +711,6 @@ static int axi_dmac_remove(struct platform_device *pdev)
of_dma_controller_free(pdev->dev.of_node);
free_irq(dmac->irq, dmac);
tasklet_kill(&dmac->chan.vchan.task);
- dma_async_device_unregister(&dmac->dma_dev);
clk_disable_unprepare(dmac->clk);
return 0;
--
2.17.1
Powered by blists - more mailing lists