Patchwork crypto:ccp - invoke the DMA callback in a standard way

login
register
mail settings
Submitter Gary R Hook
Date Sept. 5, 2017, 10:08 p.m.
Message ID <20170905220813.18963.86148.stgit@taos.amd.com>
Download mbox | patch
Permalink /patch/9939713/
State Accepted
Delegated to: Herbert Xu
Headers show

Comments

Gary R Hook - Sept. 5, 2017, 10:08 p.m.
From: amd <amd@sosxen2.amd.com>

Use the provided mechanism in dmaengine.h to invoke the
completion callback.

Signed-off-by: Gary R Hook <gary.hook@amd.com>
---
 drivers/crypto/ccp/ccp-dmaengine.c |    4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
Herbert Xu - Oct. 7, 2017, 4:18 a.m.
On Tue, Sep 05, 2017 at 05:08:14PM -0500, Gary R Hook wrote:
> From: amd <amd@sosxen2.amd.com>
> 
> Use the provided mechanism in dmaengine.h to invoke the
> completion callback.
> 
> Signed-off-by: Gary R Hook <gary.hook@amd.com>

Patch applied.  Thanks.

Patch

diff --git a/drivers/crypto/ccp/ccp-dmaengine.c b/drivers/crypto/ccp/ccp-dmaengine.c
index e01b08a28ce5..8afd62052edd 100644
--- a/drivers/crypto/ccp/ccp-dmaengine.c
+++ b/drivers/crypto/ccp/ccp-dmaengine.c
@@ -231,9 +231,7 @@  static struct ccp_dma_desc *ccp_handle_active_desc(struct ccp_dma_chan *chan,
 		spin_unlock_irqrestore(&chan->lock, flags);
 
 		if (tx_desc) {
-			if (tx_desc->callback &&
-			    (tx_desc->flags & DMA_PREP_INTERRUPT))
-				tx_desc->callback(tx_desc->callback_param);
+			dmaengine_desc_get_callback_invoke(tx_desc, NULL);
 
 			dma_run_dependencies(tx_desc);
 		}