@@ -355,9 +355,9 @@ static int img_hash_dma_init(struct img_hash_dev *hdev)
return 0;
}
-static void img_hash_dma_task(unsigned long d)
+static void img_hash_dma_task(struct tasklet_struct *t)
{
- struct img_hash_dev *hdev = (struct img_hash_dev *)d;
+ struct img_hash_dev *hdev = from_tasklet(hdev, t, dma_task);
struct img_hash_request_ctx *ctx = ahash_request_ctx(hdev->req);
u8 *addr;
size_t nbytes, bleft, wsend, len, tbc;
@@ -887,9 +887,9 @@ static int img_unregister_algs(struct img_hash_dev *hdev)
return 0;
}
-static void img_hash_done_task(unsigned long data)
+static void img_hash_done_task(struct tasklet_struct *t)
{
- struct img_hash_dev *hdev = (struct img_hash_dev *)data;
+ struct img_hash_dev *hdev = from_tasklet(hdev, t, done_task);
int err = 0;
if (hdev->err == -EINVAL) {
@@ -954,8 +954,8 @@ static int img_hash_probe(struct platform_device *pdev)
INIT_LIST_HEAD(&hdev->list);
- tasklet_init(&hdev->done_task, img_hash_done_task, (unsigned long)hdev);
- tasklet_init(&hdev->dma_task, img_hash_dma_task, (unsigned long)hdev);
+ tasklet_setup(&hdev->done_task, img_hash_done_task);
+ tasklet_setup(&hdev->dma_task, img_hash_dma_task);
crypto_init_queue(&hdev->queue, IMG_HASH_QUEUE_LENGTH);