Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

dmaengine: mediatek: convert tasklets to use new tasklet_setup() API

In preparation for unconditionally passing the
struct tasklet_struct pointer to all tasklet
callbacks, switch to using the new tasklet_setup()
and from_tasklet() to pass the tasklet pointer explicitly.

Signed-off-by: Romain Perier <romain.perier@gmail.com>
Signed-off-by: Allen Pais <allen.lkml@gmail.com>
Link: https://lore.kernel.org/r/20200831103542.305571-14-allen.lkml@gmail.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>

authored by

Allen Pais and committed by
Vinod Koul
80ef8869 881bd142

+3 -4
+3 -4
drivers/dma/mediatek/mtk-cqdma.c
··· 356 356 return ret; 357 357 } 358 358 359 - static void mtk_cqdma_tasklet_cb(unsigned long data) 359 + static void mtk_cqdma_tasklet_cb(struct tasklet_struct *t) 360 360 { 361 - struct mtk_cqdma_pchan *pc = (struct mtk_cqdma_pchan *)data; 361 + struct mtk_cqdma_pchan *pc = from_tasklet(pc, t, tasklet); 362 362 struct mtk_cqdma_vdesc *cvd = NULL; 363 363 unsigned long flags; 364 364 ··· 878 878 879 879 /* initialize tasklet for each PC */ 880 880 for (i = 0; i < cqdma->dma_channels; ++i) 881 - tasklet_init(&cqdma->pc[i]->tasklet, mtk_cqdma_tasklet_cb, 882 - (unsigned long)cqdma->pc[i]); 881 + tasklet_setup(&cqdma->pc[i]->tasklet, mtk_cqdma_tasklet_cb); 883 882 884 883 dev_info(&pdev->dev, "MediaTek CQDMA driver registered\n"); 885 884