summaryrefslogtreecommitdiffstats
path: root/drivers/dma/pch_dma.c
diff options
context:
space:
mode:
authorAllen Pais <allen.lkml@gmail.com>2020-08-31 12:35:26 +0200
committerVinod Koul <vkoul@kernel.org>2020-09-18 08:49:06 +0200
commit88ff5093ca30b73121930d2cf5f069ed2ffee6bb (patch)
treed3cde23becf2ce682be1c69674929bb64b10dce5 /drivers/dma/pch_dma.c
parentdmaengine: nbpfaxi: convert tasklets to use new tasklet_setup() API (diff)
downloadlinux-88ff5093ca30b73121930d2cf5f069ed2ffee6bb.tar.xz
linux-88ff5093ca30b73121930d2cf5f069ed2ffee6bb.zip
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>
Diffstat (limited to 'drivers/dma/pch_dma.c')
-rw-r--r--drivers/dma/pch_dma.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/dma/pch_dma.c b/drivers/dma/pch_dma.c
index e93005837e3f..1da04112fcdb 100644
--- a/drivers/dma/pch_dma.c
+++ b/drivers/dma/pch_dma.c
@@ -670,9 +670,9 @@ static int pd_device_terminate_all(struct dma_chan *chan)
return 0;
}
-static void pdc_tasklet(unsigned long data)
+static void pdc_tasklet(struct tasklet_struct *t)
{
- struct pch_dma_chan *pd_chan = (struct pch_dma_chan *)data;
+ struct pch_dma_chan *pd_chan = from_tasklet(pd_chan, t, tasklet);
unsigned long flags;
if (!pdc_is_idle(pd_chan)) {
@@ -882,8 +882,7 @@ static int pch_dma_probe(struct pci_dev *pdev,
INIT_LIST_HEAD(&pd_chan->queue);
INIT_LIST_HEAD(&pd_chan->free_list);
- tasklet_init(&pd_chan->tasklet, pdc_tasklet,
- (unsigned long)pd_chan);
+ tasklet_setup(&pd_chan->tasklet, pdc_tasklet);
list_add_tail(&pd_chan->chan.device_node, &pd->dma.channels);
}