From: Lars-Peter Clausen Date: Mon, 11 Jun 2012 18:11:40 +0000 (+0200) Subject: dmaengine: Add wrapper for device_tx_status callback X-Git-Tag: v3.6-rc1~117^2~4^2~69 X-Git-Url: https://openfabrics.org/gitweb/?a=commitdiff_plain;h=c32c44cb58d212513243744878423abd207bc8a8;p=~emulex%2Finfiniband.git dmaengine: Add wrapper for device_tx_status callback 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 Acked-by Vinod Koul Signed-off-by: Mark Brown --- diff --git a/include/linux/dmaengine.h b/include/linux/dmaengine.h index 56377df3912..cc0756a35ae 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);