All of lore.kernel.org
 help / color / mirror / Atom feed
From: Allen Pais <allen.lkml@gmail.com>
To: vkoul@kernel.org, linus.walleij@linaro.org, vireshk@kernel.org,
	leoyang.li@nxp.com, zw@zh-kernel.org, shawnguo@kernel.org,
	s.hauer@pengutronix.de, matthias.bgg@gmail.com,
	agross@kernel.org, bjorn.andersson@linaro.org, baohua@kernel.org,
	wens@csie.org
Cc: dmaengine@vger.kernel.org, Allen Pais <allen.lkml@gmail.com>,
	Romain Perier <romain.perier@gmail.com>
Subject: [PATCH 20/35] dma: pl330: convert tasklets to use new tasklet_setup() API
Date: Tue, 18 Aug 2020 14:36:23 +0530	[thread overview]
Message-ID: <20200818090638.26362-21-allen.lkml@gmail.com> (raw)
In-Reply-To: <20200818090638.26362-1-allen.lkml@gmail.com>

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>
---
 drivers/dma/pl330.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/drivers/dma/pl330.c b/drivers/dma/pl330.c
index 2c508ee672b9..5599d350ec79 100644
--- a/drivers/dma/pl330.c
+++ b/drivers/dma/pl330.c
@@ -1580,9 +1580,9 @@ static void dma_pl330_rqcb(struct dma_pl330_desc *desc, enum pl330_op_err err)
 	tasklet_schedule(&pch->task);
 }
 
-static void pl330_dotask(unsigned long data)
+static void pl330_dotask(struct tasklet_struct *t)
 {
-	struct pl330_dmac *pl330 = (struct pl330_dmac *) data;
+	struct pl330_dmac *pl330 = from_tasklet(pl330, t, tasks);
 	unsigned long flags;
 	int i;
 
@@ -1986,7 +1986,7 @@ static int pl330_add(struct pl330_dmac *pl330)
 		return ret;
 	}
 
-	tasklet_init(&pl330->tasks, pl330_dotask, (unsigned long) pl330);
+	tasklet_setup(&pl330->tasks, pl330_dotask);
 
 	pl330->state = INIT;
 
@@ -2069,9 +2069,9 @@ static inline void fill_queue(struct dma_pl330_chan *pch)
 	}
 }
 
-static void pl330_tasklet(unsigned long data)
+static void pl330_tasklet(struct tasklet_struct *t)
 {
-	struct dma_pl330_chan *pch = (struct dma_pl330_chan *)data;
+	struct dma_pl330_chan *pch = from_tasklet(pch, t, task);
 	struct dma_pl330_desc *desc, *_dt;
 	unsigned long flags;
 	bool power_down = false;
@@ -2179,7 +2179,7 @@ static int pl330_alloc_chan_resources(struct dma_chan *chan)
 		return -ENOMEM;
 	}
 
-	tasklet_init(&pch->task, pl330_tasklet, (unsigned long) pch);
+	tasklet_setup(&pch->task, pl330_tasklet);
 
 	spin_unlock_irqrestore(&pl330->lock, flags);
 
-- 
2.17.1


  parent reply	other threads:[~2020-08-18  9:08 UTC|newest]

Thread overview: 48+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-08-18  9:06 [PATCH 00/35] dma: convert tasklets to use new tasklet_setup() Allen Pais
2020-08-18  9:06 ` [PATCH 01/35] dma: altera-msgdma: convert tasklets to use new tasklet_setup() API Allen Pais
2020-08-18  9:06 ` [PATCH 02/35] dma: at_hdmac: " Allen Pais
2020-08-18  9:06 ` [PATCH 03/35] dma: at_xdmac: " Allen Pais
2020-08-18  9:06 ` [PATCH 04/35] dma: coh901318: " Allen Pais
2020-08-28  9:16   ` Linus Walleij
2020-08-18  9:06 ` [PATCH 05/35] dma: dw: " Allen Pais
2020-08-18  9:06 ` [PATCH 06/35] dma: ep93xx: " Allen Pais
2020-08-18  9:06 ` [PATCH 07/35] dma: fsl: " Allen Pais
2020-08-18  9:06 ` [PATCH 08/35] dma: imx-dma: " Allen Pais
2020-08-18  9:06 ` [PATCH 09/35] dma: ioat: " Allen Pais
2020-08-18  9:06 ` [PATCH 10/35] dma: iop_adma: " Allen Pais
2020-08-18  9:06 ` [PATCH 11/35] dma: ipu: " Allen Pais
2020-08-18  9:06 ` [PATCH 12/35] dma: k3dma: " Allen Pais
2020-08-18  9:06 ` [PATCH 13/35] dma: mediatek: " Allen Pais
2020-08-18  9:06 ` [PATCH 14/35] dma: mmp: " Allen Pais
2020-08-18  9:06 ` [PATCH 15/35] dma: mpc512x: " Allen Pais
2020-08-18  9:06 ` [PATCH 16/35] dma: mv_xor: " Allen Pais
2020-08-18  9:06 ` [PATCH 17/35] dma: mxs-dma: " Allen Pais
2020-08-18  9:06 ` [PATCH 18/35] dma: nbpfaxi: " Allen Pais
2020-08-18  9:06 ` [PATCH 19/35] dma: pch_dma: " Allen Pais
2020-08-18  9:06 ` Allen Pais [this message]
2020-08-18  9:06 ` [PATCH 21/35] dma: ppc4xx: " Allen Pais
2020-08-18  9:06 ` [PATCH 22/35] dma: qcom: " Allen Pais
2020-08-18  9:06 ` [PATCH 23/35] dma: sa11x0: " Allen Pais
2020-08-18  9:06 ` [PATCH 24/35] dma: sirf-dma: " Allen Pais
2020-08-18  9:06 ` [PATCH 25/35] dma: ste_dma40: " Allen Pais
2020-08-28  9:17   ` Linus Walleij
2020-08-18  9:06 ` [PATCH 26/35] dma: sun6i: " Allen Pais
2020-08-18  9:06 ` [PATCH 27/35] dma: tegra20: " Allen Pais
2020-08-18  9:06 ` [PATCH 28/35] dma: timb_dma: " Allen Pais
2020-08-18  9:06 ` [PATCH 29/35] dma: txx9dmac: " Allen Pais
2020-08-18  9:06 ` [PATCH 30/35] dma: virt-dma: " Allen Pais
2020-08-18  9:06 ` [PATCH 31/35] dma: xgene: " Allen Pais
2020-08-18  9:06 ` [PATCH 32/35] dma: xilinx: " Allen Pais
2020-08-18  9:06 ` [PATCH 33/35] dma: plx_dma: " Allen Pais
2020-08-18  9:06 ` [PATCH 34/35] dma: sf-pdma: " Allen Pais
2020-08-18  9:06 ` [PATCH 35/35] dma: k3-udma: " Allen Pais
2020-08-18 10:24   ` Peter Ujfalusi
2020-08-25 11:03 ` [PATCH 00/35] dma: convert tasklets to use new tasklet_setup() Vinod Koul
2020-08-26  1:11   ` Allen
2020-08-26  4:28     ` Vinod Koul
2020-08-31  6:00       ` Allen
2020-08-31  6:40         ` Vinod Koul
2020-08-31  7:25           ` Allen
  -- strict thread matches above, loose matches on Subject: below --
2020-08-17  8:16 Allen Pais
2020-08-17  8:17 ` [PATCH 20/35] dma: pl330: convert tasklets to use new tasklet_setup() API Allen Pais
2020-08-17  8:17   ` Allen Pais
2020-08-17  8:17   ` Allen Pais

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200818090638.26362-21-allen.lkml@gmail.com \
    --to=allen.lkml@gmail.com \
    --cc=agross@kernel.org \
    --cc=baohua@kernel.org \
    --cc=bjorn.andersson@linaro.org \
    --cc=dmaengine@vger.kernel.org \
    --cc=leoyang.li@nxp.com \
    --cc=linus.walleij@linaro.org \
    --cc=matthias.bgg@gmail.com \
    --cc=romain.perier@gmail.com \
    --cc=s.hauer@pengutronix.de \
    --cc=shawnguo@kernel.org \
    --cc=vireshk@kernel.org \
    --cc=vkoul@kernel.org \
    --cc=wens@csie.org \
    --cc=zw@zh-kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.