summaryrefslogtreecommitdiffstats
path: root/drivers/dma/sf-pdma
diff options
context:
space:
mode:
authorAllen Pais <apais@linux.microsoft.com>2020-10-06 10:34:57 +0530
committerVinod Koul <vkoul@kernel.org>2020-10-07 15:22:09 +0530
commit1311f7c7d909e351d659e7cc597a01e9a9c81d3f (patch)
treefddc27cf4a6db310ac83ef3b9773cf2c58752f33 /drivers/dma/sf-pdma
parent7a40871da4a315a4110f5529deaaff9fca5e9aba (diff)
downloadlinux-1311f7c7d909e351d659e7cc597a01e9a9c81d3f.tar.bz2
dmaengine: sf-pdma: 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 <apais@linux.microsoft.com> Link: https://lore.kernel.org/r/20201006050458.221329-1-allen.lkml@gmail.com Signed-off-by: Vinod Koul <vkoul@kernel.org>
Diffstat (limited to 'drivers/dma/sf-pdma')
-rw-r--r--drivers/dma/sf-pdma/sf-pdma.c14
1 files changed, 6 insertions, 8 deletions
diff --git a/drivers/dma/sf-pdma/sf-pdma.c b/drivers/dma/sf-pdma/sf-pdma.c
index 1e66c6990d81..528deb5d9f31 100644
--- a/drivers/dma/sf-pdma/sf-pdma.c
+++ b/drivers/dma/sf-pdma/sf-pdma.c
@@ -281,9 +281,9 @@ static void sf_pdma_free_desc(struct virt_dma_desc *vdesc)
desc->in_use = false;
}
-static void sf_pdma_donebh_tasklet(unsigned long arg)
+static void sf_pdma_donebh_tasklet(struct tasklet_struct *t)
{
- struct sf_pdma_chan *chan = (struct sf_pdma_chan *)arg;
+ struct sf_pdma_chan *chan = from_tasklet(chan, t, done_tasklet);
unsigned long flags;
spin_lock_irqsave(&chan->lock, flags);
@@ -300,9 +300,9 @@ static void sf_pdma_donebh_tasklet(unsigned long arg)
spin_unlock_irqrestore(&chan->vchan.lock, flags);
}
-static void sf_pdma_errbh_tasklet(unsigned long arg)
+static void sf_pdma_errbh_tasklet(struct tasklet_struct *t)
{
- struct sf_pdma_chan *chan = (struct sf_pdma_chan *)arg;
+ struct sf_pdma_chan *chan = from_tasklet(chan, t, err_tasklet);
struct sf_pdma_desc *desc = chan->desc;
unsigned long flags;
@@ -475,10 +475,8 @@ static void sf_pdma_setup_chans(struct sf_pdma *pdma)
writel(PDMA_CLEAR_CTRL, chan->regs.ctrl);
- tasklet_init(&chan->done_tasklet,
- sf_pdma_donebh_tasklet, (unsigned long)chan);
- tasklet_init(&chan->err_tasklet,
- sf_pdma_errbh_tasklet, (unsigned long)chan);
+ tasklet_setup(&chan->done_tasklet, sf_pdma_donebh_tasklet);
+ tasklet_setup(&chan->err_tasklet, sf_pdma_errbh_tasklet);
}
}