DMA Engine development
 help / color / mirror / Atom feed
From: Huang Shijie <sjhuang@iluvatar.ai>
To: vkoul@kernel.org
Cc: dan.j.williams@intel.com, Zubair.Kakakhel@imgtec.com,
	daniel@zonque.org, haojian.zhuang@gmail.com,
	robert.jarzmik@free.fr, patrice.chotard@st.com,
	linus.walleij@linaro.org, mcoquelin.stm32@gmail.com,
	alexandre.torgue@st.com, Eugeniy.Paltsev@synopsys.com,
	colin.king@canonical.com, dmaengine@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org,
	Huang Shijie <sjhuang@iluvatar.ai>
Subject: [v2,8/9] dmaengine: mxs-dma: use dmaenginem_async_device_register to simplify the code
Date: Mon,  6 Aug 2018 16:52:30 +0800	[thread overview]
Message-ID: <20180806085231.4597-9-sjhuang@iluvatar.ai> (raw)

Use dmaenginem_async_device_register to simplify the code:
	remove dma_async_device_unregister.

Signed-off-by: Huang Shijie <sjhuang@iluvatar.ai>
---
 drivers/dma/mxs-dma.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/dma/mxs-dma.c b/drivers/dma/mxs-dma.c
index ae5182ff0128..35193b31a9e0 100644
--- a/drivers/dma/mxs-dma.c
+++ b/drivers/dma/mxs-dma.c
@@ -847,7 +847,7 @@ static int __init mxs_dma_probe(struct platform_device *pdev)
 	mxs_dma->dma_device.residue_granularity = DMA_RESIDUE_GRANULARITY_BURST;
 	mxs_dma->dma_device.device_issue_pending = mxs_dma_enable_chan;
 
-	ret = dma_async_device_register(&mxs_dma->dma_device);
+	ret = dmaenginem_async_device_register(&mxs_dma->dma_device);
 	if (ret) {
 		dev_err(mxs_dma->dma_device.dev, "unable to register\n");
 		return ret;
@@ -857,7 +857,6 @@ static int __init mxs_dma_probe(struct platform_device *pdev)
 	if (ret) {
 		dev_err(mxs_dma->dma_device.dev,
 			"failed to register controller\n");
-		dma_async_device_unregister(&mxs_dma->dma_device);
 	}
 
 	dev_info(mxs_dma->dma_device.dev, "initialized\n");

                 reply	other threads:[~2018-08-06  8:52 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=20180806085231.4597-9-sjhuang@iluvatar.ai \
    --to=sjhuang@iluvatar.ai \
    --cc=Eugeniy.Paltsev@synopsys.com \
    --cc=Zubair.Kakakhel@imgtec.com \
    --cc=alexandre.torgue@st.com \
    --cc=colin.king@canonical.com \
    --cc=dan.j.williams@intel.com \
    --cc=daniel@zonque.org \
    --cc=dmaengine@vger.kernel.org \
    --cc=haojian.zhuang@gmail.com \
    --cc=linus.walleij@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=mcoquelin.stm32@gmail.com \
    --cc=patrice.chotard@st.com \
    --cc=robert.jarzmik@free.fr \
    --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