[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20180803072016.21544-25-sjhuang@iluvatar.ai>
Date: Fri, 3 Aug 2018 15:19:54 +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 24/46] dmaengine: nbpfaxi: 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 e_dma_dev_unreg
Signed-off-by: Huang Shijie <sjhuang@...vatar.ai>
---
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
Powered by blists - more mailing lists