public inbox for linux-doc@vger.kernel.org
 help / color / mirror / Atom feed
From: Huang Shijie <sjhuang@iluvatar.ai>
To: vkoul@kernel.org
Cc: corbet@lwn.net, dan.j.williams@intel.com, robh@kernel.org,
	linux-doc@vger.kernel.org, dmaengine@vger.kernel.org,
	linux-kernel@vger.kernel.org, ashutosh.dixit@intel.com,
	Huang Shijie <sjhuang@iluvatar.ai>
Subject: [PATCH v2 2/2] dmaengine: mic_x100_dma: use the new helper to simplify the code
Date: Thu, 26 Jul 2018 14:45:54 +0800	[thread overview]
Message-ID: <20180726064554.24975-2-sjhuang@iluvatar.ai> (raw)
In-Reply-To: <20180726064554.24975-1-sjhuang@iluvatar.ai>

Use dmaenginem_async_device_register() to simplify the code:
    remove the mic_dma_unregister_dma_device()

Signed-off-by: Huang Shijie <sjhuang@iluvatar.ai>
---
    Just add a user for the new helper.
---
 drivers/dma/mic_x100_dma.c | 8 +-------
 1 file changed, 1 insertion(+), 7 deletions(-)

diff --git a/drivers/dma/mic_x100_dma.c b/drivers/dma/mic_x100_dma.c
index 68dd79783b54..b76cb17d879c 100644
--- a/drivers/dma/mic_x100_dma.c
+++ b/drivers/dma/mic_x100_dma.c
@@ -470,11 +470,6 @@ static void mic_dma_chan_destroy(struct mic_dma_chan *ch)
 	mic_dma_chan_mask_intr(ch);
 }
 
-static void mic_dma_unregister_dma_device(struct mic_dma_device *mic_dma_dev)
-{
-	dma_async_device_unregister(&mic_dma_dev->dma_dev);
-}
-
 static int mic_dma_setup_irq(struct mic_dma_chan *ch)
 {
 	ch->cookie =
@@ -630,7 +625,7 @@ static int mic_dma_register_dma_device(struct mic_dma_device *mic_dma_dev,
 		list_add_tail(&mic_dma_dev->mic_ch[i].api_ch.device_node,
 			      &mic_dma_dev->dma_dev.channels);
 	}
-	return dma_async_device_register(&mic_dma_dev->dma_dev);
+	return dmaenginem_async_device_register(&mic_dma_dev->dma_dev);
 }
 
 /*
@@ -678,7 +673,6 @@ static struct mic_dma_device *mic_dma_dev_reg(struct mbus_device *mbdev,
 
 static void mic_dma_dev_unreg(struct mic_dma_device *mic_dma_dev)
 {
-	mic_dma_unregister_dma_device(mic_dma_dev);
 	mic_dma_uninit(mic_dma_dev);
 	kfree(mic_dma_dev);
 }
-- 
2.17.1

--
To unsubscribe from this list: send the line "unsubscribe linux-doc" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

  reply	other threads:[~2018-07-26  6:46 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-07-26  6:45 [PATCH v2 1/2] dmaengine: add a new helper dmaenginem_async_device_register Huang Shijie
2018-07-26  6:45 ` Huang Shijie [this message]
2018-07-30  5:20 ` Vinod

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=20180726064554.24975-2-sjhuang@iluvatar.ai \
    --to=sjhuang@iluvatar.ai \
    --cc=ashutosh.dixit@intel.com \
    --cc=corbet@lwn.net \
    --cc=dan.j.williams@intel.com \
    --cc=dmaengine@vger.kernel.org \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=robh@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