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

dmaengine: virt-dma: 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>
Reviewed-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Link: https://lore.kernel.org/r/20200831103542.305571-31-allen.lkml@gmail.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>

authored by

Allen Pais and committed by
Vinod Koul
3f7a6604 a81b0e6d

+3 -3
+3 -3
drivers/dma/virt-dma.c
··· 80 80 * This tasklet handles the completion of a DMA descriptor by 81 81 * calling its callback and freeing it. 82 82 */ 83 - static void vchan_complete(unsigned long arg) 83 + static void vchan_complete(struct tasklet_struct *t) 84 84 { 85 - struct virt_dma_chan *vc = (struct virt_dma_chan *)arg; 85 + struct virt_dma_chan *vc = from_tasklet(vc, t, task); 86 86 struct virt_dma_desc *vd, *_vd; 87 87 struct dmaengine_desc_callback cb; 88 88 LIST_HEAD(head); ··· 131 131 INIT_LIST_HEAD(&vc->desc_completed); 132 132 INIT_LIST_HEAD(&vc->desc_terminated); 133 133 134 - tasklet_init(&vc->task, vchan_complete, (unsigned long)vc); 134 + tasklet_setup(&vc->task, vchan_complete); 135 135 136 136 vc->chan.device = dmadev; 137 137 list_add_tail(&vc->chan.device_node, &dmadev->channels);