On Fri, 2016-07-15 at 09:19 +0530, Vinod Koul wrote: > On Thu, Jul 14, 2016 at 02:56:52PM -0700, Dave Jiang wrote: > > Adding dmaengine core helper function in order to prep for error > > reporting. > > > > Signed-off-by: Dave Jiang <dave.jiang@xxxxxxxxx> > > --- > > include/linux/dmaengine.h | 20 ++++++++++++++++++++ > > 1 file changed, 20 insertions(+) > > > > diff --git a/include/linux/dmaengine.h b/include/linux/dmaengine.h > > index 30de019..b601f23 100644 > > --- a/include/linux/dmaengine.h > > +++ b/include/linux/dmaengine.h > > @@ -1372,6 +1372,26 @@ static inline int dmaengine_desc_free(struct > > dma_async_tx_descriptor *desc) > > return -EPERM; > > } > > > > +struct dma_desc_callback { > > can we name this dmaengine_desc_callback. I am avoiding using dma and > encouraging dmanegine use for new stuff :) Doh! I did by mistake had it named dmaengine and then went back and changed all the patches to dma. Guess I'll change it back. > > > + dma_async_tx_callback callback; > > + void *callback_param; > > +}; > > + > > +static inline void > > +dmaengine_desc_get_callback(struct dma_async_tx_descriptor *tx, > > + struct dma_desc_callback *cb) > > +{ > > + cb->callback = tx->callback; > > + cb->callback_param = tx->callback_param; > > +} > > + > > +static inline void > > +dmaengine_desc_callback_invoke(struct dma_desc_callback *cb, void > > *result) > > +{ > > + if (cb->callback) > > + cb->callback(cb->callback_param); > > +} > > + > ��.n��������+%������w��{.n��������)�)��jg��������ݢj����G�������j:+v���w�m������w�������h�����٥