[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20200817080941.19227-18-allen.lkml@gmail.com>
Date: Mon, 17 Aug 2020 13:39:39 +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 17/19] crypto: s5p: 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/s5p-sss.c | 13 ++++++-------
1 file changed, 6 insertions(+), 7 deletions(-)
diff --git a/drivers/crypto/s5p-sss.c b/drivers/crypto/s5p-sss.c
index 341433fbcc4a..3647dffc307f 100644
--- a/drivers/crypto/s5p-sss.c
+++ b/drivers/crypto/s5p-sss.c
@@ -1443,9 +1443,9 @@ static int s5p_hash_handle_queue(struct s5p_aes_dev *dd,
* s5p_hash_tasklet_cb() - hash tasklet
* @data: ptr to s5p_aes_dev
*/
-static void s5p_hash_tasklet_cb(unsigned long data)
+static void s5p_hash_tasklet_cb(struct tasklet_struct *t)
{
- struct s5p_aes_dev *dd = (struct s5p_aes_dev *)data;
+ struct s5p_aes_dev *dd = from_tasklet(dd, t, hash_tasklet);
if (!test_bit(HASH_FLAGS_BUSY, &dd->hash_flags)) {
s5p_hash_handle_queue(dd, NULL);
@@ -1973,9 +1973,9 @@ static void s5p_aes_crypt_start(struct s5p_aes_dev *dev, unsigned long mode)
s5p_aes_complete(req, err);
}
-static void s5p_tasklet_cb(unsigned long data)
+static void s5p_tasklet_cb(struct tasklet_struct *t)
{
- struct s5p_aes_dev *dev = (struct s5p_aes_dev *)data;
+ struct s5p_aes_dev *dev = from_tasklet(dev, t, tasklet);
struct crypto_async_request *async_req, *backlog;
struct s5p_aes_reqctx *reqctx;
unsigned long flags;
@@ -2257,7 +2257,7 @@ static int s5p_aes_probe(struct platform_device *pdev)
platform_set_drvdata(pdev, pdata);
s5p_dev = pdata;
- tasklet_init(&pdata->tasklet, s5p_tasklet_cb, (unsigned long)pdata);
+ tasklet_setup(&pdata->tasklet, s5p_tasklet_cb);
crypto_init_queue(&pdata->queue, CRYPTO_QUEUE_LEN);
for (i = 0; i < ARRAY_SIZE(algs); i++) {
@@ -2267,8 +2267,7 @@ static int s5p_aes_probe(struct platform_device *pdev)
}
if (pdata->use_hash) {
- tasklet_init(&pdata->hash_tasklet, s5p_hash_tasklet_cb,
- (unsigned long)pdata);
+ tasklet_setup(&pdata->hash_tasklet, s5p_hash_tasklet_cb);
crypto_init_queue(&pdata->hash_queue, SSS_HASH_QUEUE_LENGTH);
for (hash_i = 0; hash_i < ARRAY_SIZE(algs_sha1_md5_sha256);
--
2.17.1
Powered by blists - more mailing lists