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

dmaengine: pch_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-20-allen.lkml@gmail.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>

authored by

Allen Pais and committed by
Vinod Koul
88ff5093 bbc61540

+3 -4
+3 -4
drivers/dma/pch_dma.c
··· 670 670 return 0; 671 671 } 672 672 673 - static void pdc_tasklet(unsigned long data) 673 + static void pdc_tasklet(struct tasklet_struct *t) 674 674 { 675 - struct pch_dma_chan *pd_chan = (struct pch_dma_chan *)data; 675 + struct pch_dma_chan *pd_chan = from_tasklet(pd_chan, t, tasklet); 676 676 unsigned long flags; 677 677 678 678 if (!pdc_is_idle(pd_chan)) { ··· 882 882 INIT_LIST_HEAD(&pd_chan->queue); 883 883 INIT_LIST_HEAD(&pd_chan->free_list); 884 884 885 - tasklet_init(&pd_chan->tasklet, pdc_tasklet, 886 - (unsigned long)pd_chan); 885 + tasklet_setup(&pd_chan->tasklet, pdc_tasklet); 887 886 list_add_tail(&pd_chan->chan.device_node, &pd->dma.channels); 888 887 } 889 888