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

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

authored by

Allen Pais and committed by
Vinod Koul
6c1fd9ad f19a11d4

+3 -4
+3 -4
drivers/dma/plx_dma.c
··· 241 241 rcu_read_unlock(); 242 242 } 243 243 244 - static void plx_dma_desc_task(unsigned long data) 244 + static void plx_dma_desc_task(struct tasklet_struct *t) 245 245 { 246 - struct plx_dma_dev *plxdev = (void *)data; 246 + struct plx_dma_dev *plxdev = from_tasklet(plxdev, t, desc_task); 247 247 248 248 plx_dma_process_desc(plxdev); 249 249 } ··· 513 513 } 514 514 515 515 spin_lock_init(&plxdev->ring_lock); 516 - tasklet_init(&plxdev->desc_task, plx_dma_desc_task, 517 - (unsigned long)plxdev); 516 + tasklet_setup(&plxdev->desc_task, plx_dma_desc_task); 518 517 519 518 RCU_INIT_POINTER(plxdev->pdev, pdev); 520 519 plxdev->bar = pcim_iomap_table(pdev)[0];