From: Huang Shijie <sjhuang@iluvatar.ai>
To: vkoul@kernel.org
Cc: dmaengine@vger.kernel.org, linux-kernel@vger.kernel.org,
dave.jiang@intel.com, radhey.shyam.pandey@xilinx.com,
appana.durga.rao@xilinx.com, jmkrzyszt@gmail.com,
gomonovych@gmail.com, peter.ujfalusi@ti.com,
keescook@chromium.org, horms+renesas@verge.net.au,
geert+renesas@glider.be, shawnguo@kernel.org,
baoyou.xie@linaro.org, michal.simek@xilinx.com,
baohua@kernel.org, ludovic.desroches@microchip.com,
linus.walleij@linaro.org, david.brown@linaro.org,
Huang Shijie <sjhuang@iluvatar.ai>
Subject: [37/46] dmaengine: imx-sdma: use dmaenginem_async_device_register to simplify the code
Date: Fri, 3 Aug 2018 15:20:07 +0800 [thread overview]
Message-ID: <20180803072016.21544-38-sjhuang@iluvatar.ai> (raw)
Use dmaenginem_async_device_register to simplify the code:
remove dma_async_device_unregister.
remove label err_register
Signed-off-by: Huang Shijie <sjhuang@iluvatar.ai>
---
drivers/dma/imx-sdma.c | 7 ++-----
1 file changed, 2 insertions(+), 5 deletions(-)
diff --git a/drivers/dma/imx-sdma.c b/drivers/dma/imx-sdma.c
index b4ec2d20e661..3ee28d044e3c 100644
--- a/drivers/dma/imx-sdma.c
+++ b/drivers/dma/imx-sdma.c
@@ -2062,7 +2062,7 @@ static int sdma_probe(struct platform_device *pdev)
platform_set_drvdata(pdev, sdma);
- ret = dma_async_device_register(&sdma->dma_device);
+ ret = dmaenginem_async_device_register(&sdma->dma_device);
if (ret) {
dev_err(&pdev->dev, "unable to register\n");
goto err_init;
@@ -2072,7 +2072,7 @@ static int sdma_probe(struct platform_device *pdev)
ret = of_dma_controller_register(np, sdma_xlate, sdma);
if (ret) {
dev_err(&pdev->dev, "failed to register controller\n");
- goto err_register;
+ goto err_init;
}
spba_bus = of_find_compatible_node(NULL, NULL, "fsl,spba-bus");
@@ -2086,8 +2086,6 @@ static int sdma_probe(struct platform_device *pdev)
return 0;
-err_register:
- dma_async_device_unregister(&sdma->dma_device);
err_init:
kfree(sdma->script_addrs);
err_irq:
@@ -2103,7 +2101,6 @@ static int sdma_remove(struct platform_device *pdev)
int i;
devm_free_irq(&pdev->dev, sdma->irq, sdma);
- dma_async_device_unregister(&sdma->dma_device);
kfree(sdma->script_addrs);
clk_unprepare(sdma->clk_ahb);
clk_unprepare(sdma->clk_ipg);
reply other threads:[~2018-08-03 7:20 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180803072016.21544-38-sjhuang@iluvatar.ai \
--to=sjhuang@iluvatar.ai \
--cc=appana.durga.rao@xilinx.com \
--cc=baohua@kernel.org \
--cc=baoyou.xie@linaro.org \
--cc=dave.jiang@intel.com \
--cc=david.brown@linaro.org \
--cc=dmaengine@vger.kernel.org \
--cc=geert+renesas@glider.be \
--cc=gomonovych@gmail.com \
--cc=horms+renesas@verge.net.au \
--cc=jmkrzyszt@gmail.com \
--cc=keescook@chromium.org \
--cc=linus.walleij@linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=ludovic.desroches@microchip.com \
--cc=michal.simek@xilinx.com \
--cc=peter.ujfalusi@ti.com \
--cc=radhey.shyam.pandey@xilinx.com \
--cc=shawnguo@kernel.org \
--cc=vkoul@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox