From f57d0cc0f8656c9231e32fbaaa30f2c34115de24 Mon Sep 17 00:00:00 2001 From: Russell King Date: Thu, 10 May 2012 23:39:27 +0100 Subject: [PATCH] --- yaml --- r: 321117 b: refs/heads/master c: fe045874aaf4480386c65baf1acae82af4c5e21f h: refs/heads/master i: 321115: 008bcbe0b857d26232ec88fa1b2a6347ca1a4a10 v: v3 --- [refs] | 2 +- trunk/drivers/dma/virt-dma.c | 13 +++++++++++++ trunk/drivers/dma/virt-dma.h | 2 +- 3 files changed, 15 insertions(+), 2 deletions(-) diff --git a/[refs] b/[refs] index a781b272287a..2398ab7c1168 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 50437bff7f7374f86837986f66e15e73a364f894 +refs/heads/master: fe045874aaf4480386c65baf1acae82af4c5e21f diff --git a/trunk/drivers/dma/virt-dma.c b/trunk/drivers/dma/virt-dma.c index bd85b052b481..a8054fc40cef 100644 --- a/trunk/drivers/dma/virt-dma.c +++ b/trunk/drivers/dma/virt-dma.c @@ -39,6 +39,19 @@ dma_cookie_t vchan_tx_submit(struct dma_async_tx_descriptor *tx) } EXPORT_SYMBOL_GPL(vchan_tx_submit); +struct virt_dma_desc *vchan_find_desc(struct virt_dma_chan *vc, + dma_cookie_t cookie) +{ + struct virt_dma_desc *vd; + + list_for_each_entry(vd, &vc->desc_issued, node) + if (vd->tx.cookie == cookie) + return vd; + + return NULL; +} +EXPORT_SYMBOL_GPL(vchan_find_desc); + /* * This tasklet handles the completion of a DMA descriptor by * calling its callback and freeing it. diff --git a/trunk/drivers/dma/virt-dma.h b/trunk/drivers/dma/virt-dma.h index 825bb9623175..44ec57e7e419 100644 --- a/trunk/drivers/dma/virt-dma.h +++ b/trunk/drivers/dma/virt-dma.h @@ -40,8 +40,8 @@ static inline struct virt_dma_chan *to_virt_chan(struct dma_chan *chan) } void vchan_dma_desc_free_list(struct virt_dma_chan *vc, struct list_head *head); - void vchan_init(struct virt_dma_chan *vc, struct dma_device *dmadev); +struct virt_dma_desc *vchan_find_desc(struct virt_dma_chan *, dma_cookie_t); /** * vchan_tx_prep - prepare a descriptor