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

dmaengine: imx-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>
Link: https://lore.kernel.org/r/20200831103542.305571-9-allen.lkml@gmail.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>

authored by

Allen Pais and committed by
Vinod Koul
cce010a5 95fbf163

+3 -4
+3 -4
drivers/dma/imx-dma.c
··· 612 612 return 0; 613 613 } 614 614 615 - static void imxdma_tasklet(unsigned long data) 615 + static void imxdma_tasklet(struct tasklet_struct *t) 616 616 { 617 - struct imxdma_channel *imxdmac = (void *)data; 617 + struct imxdma_channel *imxdmac = from_tasklet(imxdmac, t, dma_tasklet); 618 618 struct imxdma_engine *imxdma = imxdmac->imxdma; 619 619 struct imxdma_desc *desc, *next_desc; 620 620 unsigned long flags; ··· 1168 1168 INIT_LIST_HEAD(&imxdmac->ld_free); 1169 1169 INIT_LIST_HEAD(&imxdmac->ld_active); 1170 1170 1171 - tasklet_init(&imxdmac->dma_tasklet, imxdma_tasklet, 1172 - (unsigned long)imxdmac); 1171 + tasklet_setup(&imxdmac->dma_tasklet, imxdma_tasklet); 1173 1172 imxdmac->chan.device = &imxdma->dma_device; 1174 1173 dma_cookie_init(&imxdmac->chan); 1175 1174 imxdmac->channel = i;