[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20200817080941.19227-5-allen.lkml@gmail.com>
Date: Mon, 17 Aug 2020 13:39:26 +0530
From: Allen Pais <allen.lkml@...il.com>
To: nicolas.ferre@...rochip.com, alexandre.belloni@...tlin.com,
ludovic.desroches@...rochip.com, heiko@...ech.de,
matthias.bgg@...il.com
Cc: keescook@...omium.org, linux-kernel@...r.kernel.org,
linux-arm-kernel@...ts.infradead.org,
linux-rockchip@...ts.infradead.org,
inux-mediatek@...ts.infradead.org,
Allen Pais <allen.lkml@...il.com>,
Romain Perier <romain.perier@...il.com>
Subject: [PATCH 04/19] crypto: caam: 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@...il.com>
Signed-off-by: Allen Pais <allen.lkml@...il.com>
---
drivers/crypto/caam/jr.c | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/drivers/crypto/caam/jr.c b/drivers/crypto/caam/jr.c
index bf6b03b17251..4dc923736ba8 100644
--- a/drivers/crypto/caam/jr.c
+++ b/drivers/crypto/caam/jr.c
@@ -201,11 +201,10 @@ 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);
void (*usercall)(struct device *dev, u32 *desc, u32 status, void *arg);
u32 *userdesc, userstatus;
void *userarg;
@@ -483,7 +482,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.17.1
Powered by blists - more mailing lists