[PATCH v3 28/41] dmaengine: sirf-dma: convert callback to helper function

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Convert driver to use the new helper function for callback

Signed-off-by: Dave Jiang <dave.jiang@xxxxxxxxx>
---
 drivers/dma/sirf-dma.c |   13 ++++++++-----
 1 file changed, 8 insertions(+), 5 deletions(-)

diff --git a/drivers/dma/sirf-dma.c b/drivers/dma/sirf-dma.c
index e48350e..981fa56 100644
--- a/drivers/dma/sirf-dma.c
+++ b/drivers/dma/sirf-dma.c
@@ -358,11 +358,12 @@ static void sirfsoc_dma_process_completed(struct sirfsoc_dma *sdma)
 
 			/* Execute callbacks and run dependencies */
 			list_for_each_entry(sdesc, &list, node) {
-				desc = &sdesc->desc;
+				struct dmaengine_desc_callback cb;
 
-				if (desc->callback)
-					desc->callback(desc->callback_param);
+				desc = &sdesc->desc;
 
+				dmaengine_desc_get_callback_invoke(desc, &cb,
+								   NULL);
 				last_cookie = desc->cookie;
 				dma_run_dependencies(desc);
 			}
@@ -388,8 +389,10 @@ 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);
+				struct dmaengine_desc_callback cb;
+
+				dmaengine_desc_get_callback_invoke(desc, &cb,
+								   NULL);
 				schan->completed_cyclic++;
 			}
 		}

--
To unsubscribe from this list: send the line "unsubscribe dmaengine" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Kernel]     [Linux ARM (vger)]     [Linux ARM MSM]     [Linux Omap]     [Linux Arm]     [Linux Tegra]     [Fedora ARM]     [Linux for Samsung SOC]     [eCos]     [Linux PCI]     [Linux Fastboot]     [Gcc Help]     [Git]     [DCCP]     [IETF Announce]     [Security]     [Linux MIPS]     [Yosemite Campsites]

  Powered by Linux