Commit a81b0e6d authored by Allen Pais's avatar Allen Pais Committed by Vinod Koul
Browse files

dmaengine: txx9dmac: 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: default avatarRomain Perier <romain.perier@gmail.com>
Signed-off-by: default avatarAllen Pais <allen.lkml@gmail.com>
Link: https://lore.kernel.org/r/20200831103542.305571-30-allen.lkml@gmail.com


Signed-off-by: default avatarVinod Koul <vkoul@kernel.org>
parent 83547958
Loading
Loading
Loading
Loading
+6 −8
Original line number Diff line number Diff line
@@ -601,13 +601,13 @@ scan_done:
	}
}

static void txx9dmac_chan_tasklet(unsigned long data)
static void txx9dmac_chan_tasklet(struct tasklet_struct *t)
{
	int irq;
	u32 csr;
	struct txx9dmac_chan *dc;

	dc = (struct txx9dmac_chan *)data;
	dc = from_tasklet(dc, t, tasklet);
	csr = channel_readl(dc, CSR);
	dev_vdbg(chan2dev(&dc->chan), "tasklet: status=%x\n", csr);

@@ -638,13 +638,13 @@ static irqreturn_t txx9dmac_chan_interrupt(int irq, void *dev_id)
	return IRQ_HANDLED;
}

static void txx9dmac_tasklet(unsigned long data)
static void txx9dmac_tasklet(struct tasklet_struct *t)
{
	int irq;
	u32 csr;
	struct txx9dmac_chan *dc;

	struct txx9dmac_dev *ddev = (struct txx9dmac_dev *)data;
	struct txx9dmac_dev *ddev = from_tasklet(ddev, t, tasklet);
	u32 mcr;
	int i;

@@ -1113,8 +1113,7 @@ static int __init txx9dmac_chan_probe(struct platform_device *pdev)
		irq = platform_get_irq(pdev, 0);
		if (irq < 0)
			return irq;
		tasklet_init(&dc->tasklet, txx9dmac_chan_tasklet,
				(unsigned long)dc);
		tasklet_setup(&dc->tasklet, txx9dmac_chan_tasklet);
		dc->irq = irq;
		err = devm_request_irq(&pdev->dev, dc->irq,
			txx9dmac_chan_interrupt, 0, dev_name(&pdev->dev), dc);
@@ -1200,8 +1199,7 @@ static int __init txx9dmac_probe(struct platform_device *pdev)

	ddev->irq = platform_get_irq(pdev, 0);
	if (ddev->irq >= 0) {
		tasklet_init(&ddev->tasklet, txx9dmac_tasklet,
				(unsigned long)ddev);
		tasklet_setup(&ddev->tasklet, txx9dmac_tasklet);
		err = devm_request_irq(&pdev->dev, ddev->irq,
			txx9dmac_interrupt, 0, dev_name(&pdev->dev), ddev);
		if (err)