[PATCH 13/19] crypto: picoxcell: convert tasklets to use new tasklet_setup() API
Allen Pais
allen.lkml at gmail.com
Mon Aug 17 04:09:35 EDT 2020
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 at gmail.com>
Signed-off-by: Allen Pais <allen.lkml at gmail.com>
---
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
More information about the Linux-rockchip
mailing list