Skip to content

Commit

Permalink
dmaengine: sirf-dma: convert callback to helper function
Browse files Browse the repository at this point in the history
This is in preperation of moving to a callback that provides results to the
callback for the transaction. The conversion will maintain current behavior
and the driver must convert to new callback mechanism at a later time in
order to receive results.

Signed-off-by: Dave Jiang <[email protected]>
Reviewed-by: Lars-Peter Clausen <[email protected]>
Signed-off-by: Vinod Koul <[email protected]>
  • Loading branch information
davejiang authored and Vinod Koul committed Aug 8, 2016
1 parent 964b2fd commit b8bdebb
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions drivers/dma/sirf-dma.c
Original file line number Diff line number Diff line change
Expand Up @@ -360,9 +360,7 @@ static void sirfsoc_dma_process_completed(struct sirfsoc_dma *sdma)
list_for_each_entry(sdesc, &list, node) {
desc = &sdesc->desc;

if (desc->callback)
desc->callback(desc->callback_param);

dmaengine_desc_get_callback_invoke(desc, NULL);
last_cookie = desc->cookie;
dma_run_dependencies(desc);
}
Expand All @@ -388,8 +386,7 @@ static void sirfsoc_dma_process_completed(struct sirfsoc_dma *sdma)

desc = &sdesc->desc;
while (happened_cyclic != schan->completed_cyclic) {
if (desc->callback)
desc->callback(desc->callback_param);
dmaengine_desc_get_callback_invoke(desc, NULL);
schan->completed_cyclic++;
}
}
Expand Down

0 comments on commit b8bdebb

Please sign in to comment.