[PATCH 13/19] crypto: picoxcell: convert tasklets to use new tasklet_setup() API
From: Allen Pais
Date: Mon Aug 17 2020 - 04:11:22 EST
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@xxxxxxxxx>
Signed-off-by: Allen Pais <allen.lkml@xxxxxxxxx>
---
drivers/crypto/picoxcell_crypto.c | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/drivers/crypto/picoxcell_crypto.c b/drivers/crypto/picoxcell_crypto.c
index dac6eb37fff9..a394d51f8d44 100644
--- a/drivers/crypto/picoxcell_crypto.c
+++ b/drivers/crypto/picoxcell_crypto.c
@@ -1136,9 +1136,9 @@ static int spacc_req_submit(struct spacc_req *req)
return spacc_ablk_submit(req);
}
-static void spacc_spacc_complete(unsigned long data)
+static void spacc_spacc_complete(struct tasklet_struct *t)
{
- struct spacc_engine *engine = (struct spacc_engine *)data;
+ struct spacc_engine *engine = from_tasklet(engine, t, complete);
struct spacc_req *req, *tmp;
unsigned long flags;
LIST_HEAD(completed);
@@ -1648,8 +1648,7 @@ static int spacc_probe(struct platform_device *pdev)
return -ENXIO;
}
- tasklet_init(&engine->complete, spacc_spacc_complete,
- (unsigned long)engine);
+ tasklet_setup(&engine->complete, spacc_spacc_complete);
ret = devm_add_action(&pdev->dev, spacc_tasklet_kill,
&engine->complete);
--
2.17.1