Skip to content

Commit 1311f7c

Browse files
allenpaisvinodkoul
authored andcommitted
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 <[email protected]> Signed-off-by: Allen Pais <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Vinod Koul <[email protected]>
1 parent 7a40871 commit 1311f7c

File tree

1 file changed

+6
-8
lines changed

1 file changed

+6
-8
lines changed

drivers/dma/sf-pdma/sf-pdma.c

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -281,9 +281,9 @@ static void sf_pdma_free_desc(struct virt_dma_desc *vdesc)
281281
desc->in_use = false;
282282
}
283283

284-
static void sf_pdma_donebh_tasklet(unsigned long arg)
284+
static void sf_pdma_donebh_tasklet(struct tasklet_struct *t)
285285
{
286-
struct sf_pdma_chan *chan = (struct sf_pdma_chan *)arg;
286+
struct sf_pdma_chan *chan = from_tasklet(chan, t, done_tasklet);
287287
unsigned long flags;
288288

289289
spin_lock_irqsave(&chan->lock, flags);
@@ -300,9 +300,9 @@ static void sf_pdma_donebh_tasklet(unsigned long arg)
300300
spin_unlock_irqrestore(&chan->vchan.lock, flags);
301301
}
302302

303-
static void sf_pdma_errbh_tasklet(unsigned long arg)
303+
static void sf_pdma_errbh_tasklet(struct tasklet_struct *t)
304304
{
305-
struct sf_pdma_chan *chan = (struct sf_pdma_chan *)arg;
305+
struct sf_pdma_chan *chan = from_tasklet(chan, t, err_tasklet);
306306
struct sf_pdma_desc *desc = chan->desc;
307307
unsigned long flags;
308308

@@ -475,10 +475,8 @@ static void sf_pdma_setup_chans(struct sf_pdma *pdma)
475475

476476
writel(PDMA_CLEAR_CTRL, chan->regs.ctrl);
477477

478-
tasklet_init(&chan->done_tasklet,
479-
sf_pdma_donebh_tasklet, (unsigned long)chan);
480-
tasklet_init(&chan->err_tasklet,
481-
sf_pdma_errbh_tasklet, (unsigned long)chan);
478+
tasklet_setup(&chan->done_tasklet, sf_pdma_donebh_tasklet);
479+
tasklet_setup(&chan->err_tasklet, sf_pdma_errbh_tasklet);
482480
}
483481
}
484482

0 commit comments

Comments
 (0)