linux-samsung-soc.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 04/19] crypto: caam: convert tasklets to use new tasklet_setup() API
@ 2021-01-07 12:29 Allen Pais
  2021-01-07 12:29 ` [PATCH v2 05/19] crypto: cavium: " Allen Pais
                   ` (14 more replies)
  0 siblings, 15 replies; 18+ messages in thread
From: Allen Pais @ 2021-01-07 12:29 UTC (permalink / raw)
  To: herbert
  Cc: davem, nicolas.ferre, alexandre.belloni, ludovic.desroches,
	jesper.nilsson, lars.persson, horia.geanta, aymen.sghaier,
	gcherian, thomas.lendacky, john.allen, gilad, bbrezillon, arno,
	schalla, matthias.bgg, jamie, giovanni.cabiddu, heiko, krzk, vz,
	k.konieczny, linux-crypto, linux-mediatek, qat-linux,
	linux-rockchip, linux-samsung-soc, Allen Pais, Romain Perier

From: Allen Pais <apais@linux.microsoft.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.

Reviewed-by: Horia Geantă <horia.geanta@nxp.com>
Signed-off-by: Romain Perier <romain.perier@gmail.com>
Signed-off-by: Allen Pais <apais@linux.microsoft.com>
---
 drivers/crypto/caam/jr.c | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/drivers/crypto/caam/jr.c b/drivers/crypto/caam/jr.c
index 7f2b1101f567..2903e1af0a56 100644
--- a/drivers/crypto/caam/jr.c
+++ b/drivers/crypto/caam/jr.c
@@ -9,6 +9,7 @@
 
 #include <linux/of_irq.h>
 #include <linux/of_address.h>
+#include <linux/interrupt.h>
 
 #include "compat.h"
 #include "ctrl.h"
@@ -201,11 +202,11 @@ static irqreturn_t caam_jr_interrupt(int irq, void *st_dev)
 }
 
 /* Deferred service handler, run as interrupt-fired tasklet */
-static void caam_jr_dequeue(unsigned long devarg)
+static void caam_jr_dequeue(struct tasklet_struct *t)
 {
 	int hw_idx, sw_idx, i, head, tail;
-	struct device *dev = (struct device *)devarg;
-	struct caam_drv_private_jr *jrp = dev_get_drvdata(dev);
+	struct caam_drv_private_jr *jrp = from_tasklet(jrp, t, irqtask);
+	struct device *dev = jrp->dev;
 	void (*usercall)(struct device *dev, u32 *desc, u32 status, void *arg);
 	u32 *userdesc, userstatus;
 	void *userarg;
@@ -483,7 +484,7 @@ static int caam_jr_init(struct device *dev)
 		      (JOBR_INTC_COUNT_THLD << JRCFG_ICDCT_SHIFT) |
 		      (JOBR_INTC_TIME_THLD << JRCFG_ICTT_SHIFT));
 
-	tasklet_init(&jrp->irqtask, caam_jr_dequeue, (unsigned long)dev);
+	tasklet_setup(&jrp->irqtask, caam_jr_dequeue);
 
 	/* Connect job ring interrupt handler. */
 	error = devm_request_irq(dev, jrp->irq, caam_jr_interrupt, IRQF_SHARED,
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 18+ messages in thread

end of thread, other threads:[~2021-01-07 12:46 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-07 12:29 [PATCH v2 04/19] crypto: caam: convert tasklets to use new tasklet_setup() API Allen Pais
2021-01-07 12:29 ` [PATCH v2 05/19] crypto: cavium: " Allen Pais
2021-01-07 12:29 ` [PATCH v2 06/19] crypto: ccp: " Allen Pais
2021-01-07 12:29 ` [PATCH v2 07/19] crypto: ccree: " Allen Pais
2021-01-07 12:29 ` [PATCH v2 08/19] crypto: hifn_795x: " Allen Pais
2021-01-07 12:29 ` [PATCH v2 09/19] crypto: img-hash: " Allen Pais
2021-01-07 12:29 ` [PATCH v2 10/19] crypto: ixp4xx: " Allen Pais
2021-01-07 12:29 ` [PATCH v2 11/19] crypto: mediatek: " Allen Pais
2021-01-07 12:29 ` [PATCH v2 12/19] crypto: omap: " Allen Pais
2021-01-07 12:29 ` [PATCH v2 13/19] crypto: picoxcell: " Allen Pais
2021-01-07 12:29 ` [PATCH v2 14/19] crypto: qat: " Allen Pais
2021-01-07 12:29 ` [PATCH v2 15/19] crypto: qce: " Allen Pais
2021-01-07 12:29 ` [PATCH v2 16/19] crypto: rockchip: " Allen Pais
2021-01-07 12:40   ` Emil Renner Berthing
2021-01-07 12:45     ` Allen Pais
2021-01-07 12:29 ` [PATCH v2 17/19] crypto: s5p: " Allen Pais
2021-01-07 12:29 ` [PATCH v2 18/19] crypto: talitos: " Allen Pais
2021-01-07 12:29 ` [PATCH v2 19/19] crypto: octeontx: " Allen Pais

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).