[PATCH 28/40] 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, 9 insertions(+), 4 deletions(-)

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