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: [15/46] dmaengine: s3c24xx-dma: use dmaenginem_async_device_register to simplify the code
Date: Fri, 3 Aug 2018 15:19:45 +0800 [thread overview]
Message-ID: <20180803072016.21544-16-sjhuang@iluvatar.ai> (raw)
Use dmaenginem_async_device_register to simplify the code:
remove dma_async_device_unregister.
remove label err_slave_reg
Signed-off-by: Huang Shijie <sjhuang@iluvatar.ai>
---
drivers/dma/s3c24xx-dma.c | 11 +++--------
1 file changed, 3 insertions(+), 8 deletions(-)
diff --git a/drivers/dma/s3c24xx-dma.c b/drivers/dma/s3c24xx-dma.c
index 64744eb88720..1d820c0cd14b 100644
--- a/drivers/dma/s3c24xx-dma.c
+++ b/drivers/dma/s3c24xx-dma.c
@@ -1330,7 +1330,7 @@ static int s3c24xx_dma_probe(struct platform_device *pdev)
goto err_slave;
}
- ret = dma_async_device_register(&s3cdma->memcpy);
+ ret = dmaenginem_async_device_register(&s3cdma->memcpy);
if (ret) {
dev_warn(&pdev->dev,
"%s failed to register memcpy as an async device - %d\n",
@@ -1338,12 +1338,12 @@ static int s3c24xx_dma_probe(struct platform_device *pdev)
goto err_memcpy_reg;
}
- ret = dma_async_device_register(&s3cdma->slave);
+ ret = dmaenginem_async_device_register(&s3cdma->slave);
if (ret) {
dev_warn(&pdev->dev,
"%s failed to register slave as an async device - %d\n",
__func__, ret);
- goto err_slave_reg;
+ goto err_memcpy_reg;
}
platform_set_drvdata(pdev, s3cdma);
@@ -1352,8 +1352,6 @@ static int s3c24xx_dma_probe(struct platform_device *pdev)
return 0;
-err_slave_reg:
- dma_async_device_unregister(&s3cdma->memcpy);
err_memcpy_reg:
s3c24xx_dma_free_virtual_channels(&s3cdma->slave);
err_slave:
@@ -1388,9 +1386,6 @@ static int s3c24xx_dma_remove(struct platform_device *pdev)
struct soc_data *sdata = s3c24xx_dma_get_soc_data(pdev);
int i;
- dma_async_device_unregister(&s3cdma->slave);
- dma_async_device_unregister(&s3cdma->memcpy);
-
s3c24xx_dma_free_irq(pdev, s3cdma);
s3c24xx_dma_free_virtual_channels(&s3cdma->slave);
reply other threads:[~2018-08-03 7:19 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-16-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