summaryrefslogtreecommitdiff
path: root/drivers/dma/plx_dma.c
diff options
context:
space:
mode:
authorAllen Pais <allen.lkml@gmail.com>2020-08-31 16:05:40 +0530
committerVinod Koul <vkoul@kernel.org>2020-09-18 12:19:07 +0530
commit6c1fd9ad2c5b722cf4b6c300ea3660ba324dae98 (patch)
treeee9740e16fa0c9c6078b5d0a70c8bff1e48aed1e /drivers/dma/plx_dma.c
parentf19a11d40a78866e06b92fe157aa9258ed3388a3 (diff)
downloadlwn-6c1fd9ad2c5b722cf4b6c300ea3660ba324dae98.tar.gz
lwn-6c1fd9ad2c5b722cf4b6c300ea3660ba324dae98.zip
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>
Diffstat (limited to 'drivers/dma/plx_dma.c')
-rw-r--r--drivers/dma/plx_dma.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/dma/plx_dma.c b/drivers/dma/plx_dma.c
index db4c5fd453a9..f387c5bbc170 100644
--- a/drivers/dma/plx_dma.c
+++ b/drivers/dma/plx_dma.c
@@ -241,9 +241,9 @@ static void plx_dma_stop(struct plx_dma_dev *plxdev)
rcu_read_unlock();
}
-static void plx_dma_desc_task(unsigned long data)
+static void plx_dma_desc_task(struct tasklet_struct *t)
{
- struct plx_dma_dev *plxdev = (void *)data;
+ struct plx_dma_dev *plxdev = from_tasklet(plxdev, t, desc_task);
plx_dma_process_desc(plxdev);
}
@@ -513,8 +513,7 @@ static int plx_dma_create(struct pci_dev *pdev)
}
spin_lock_init(&plxdev->ring_lock);
- tasklet_init(&plxdev->desc_task, plx_dma_desc_task,
- (unsigned long)plxdev);
+ tasklet_setup(&plxdev->desc_task, plx_dma_desc_task);
RCU_INIT_POINTER(plxdev->pdev, pdev);
plxdev->bar = pcim_iomap_table(pdev)[0];