linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 1/3] dmaengine: Add wrapper for device_tx_status callback
@ 2012-06-11 18:11 Lars-Peter Clausen
  2012-06-11 18:11 ` [PATCH v2 2/3] ASoC: dmaengine-pcm: Rename and deprecate snd_dmaengine_pcm_pointer Lars-Peter Clausen
                   ` (3 more replies)
  0 siblings, 4 replies; 14+ messages in thread
From: Lars-Peter Clausen @ 2012-06-11 18:11 UTC (permalink / raw)
  To: Mark Brown, Liam Girdwood, Vinod Koul
  Cc: Russell King, Ola Lilja, Shawn Guo, Mika Westerberg, alsa-devel,
	linux-kernel, Lars-Peter Clausen

This patch adds a small inline wrapper for the devivce_tx_status callback of a
dma device. This makes the source code of users of this function a bit more
compact and a bit more legible.

E.g.:
-status = chan->device->device_tx_status(chan, cookie, &state)
+status = dmaengine_tx_status(chan, cookie, &state)

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>

---
No changes since v1

---
 include/linux/dmaengine.h |    6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/include/linux/dmaengine.h b/include/linux/dmaengine.h
index 56377df..cc0756a 100644
--- a/include/linux/dmaengine.h
+++ b/include/linux/dmaengine.h
@@ -670,6 +670,12 @@ static inline int dmaengine_resume(struct dma_chan *chan)
 	return dmaengine_device_control(chan, DMA_RESUME, 0);
 }
 
+static inline enum dma_status dmaengine_tx_status(struct dma_chan *chan,
+	dma_cookie_t cookie, struct dma_tx_state *state)
+{
+	return chan->device->device_tx_status(chan, cookie, state);
+}
+
 static inline dma_cookie_t dmaengine_submit(struct dma_async_tx_descriptor *desc)
 {
 	return desc->tx_submit(desc);
-- 
1.7.10


^ permalink raw reply related	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2012-06-20 14:40 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-06-11 18:11 [PATCH v2 1/3] dmaengine: Add wrapper for device_tx_status callback Lars-Peter Clausen
2012-06-11 18:11 ` [PATCH v2 2/3] ASoC: dmaengine-pcm: Rename and deprecate snd_dmaengine_pcm_pointer Lars-Peter Clausen
2012-06-20 10:55   ` Vinod Koul
2012-06-20 13:41   ` [alsa-devel] " Dong Aisheng
2012-06-11 18:11 ` [PATCH v2 3/3] ASoC: dmaengine-pcm: Add support for querying stream position from DMA driver Lars-Peter Clausen
2012-06-20 10:55   ` Vinod Koul
2012-06-20 13:48   ` [alsa-devel] " Dong Aisheng
2012-06-20 14:11     ` Lars-Peter Clausen
2012-06-20 10:54 ` [PATCH v2 1/3] dmaengine: Add wrapper for device_tx_status callback Vinod Koul
2012-06-20 12:13   ` Lars-Peter Clausen
2012-06-20 13:09     ` Mark Brown
2012-06-20 13:37       ` Vinod Koul
2012-06-20 13:35     ` Vinod Koul
2012-06-20 14:40 ` Mark Brown

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).