@@ -2300,16 +2300,16 @@ static void atmel_aes_dma_cleanup(struct atmel_aes_dev *dd)
dma_release_channel(dd->src.chan);
}
-static void atmel_aes_queue_task(unsigned long data)
+static void atmel_aes_queue_task(struct tasklet_struct *t)
{
- struct atmel_aes_dev *dd = (struct atmel_aes_dev *)data;
+ struct atmel_aes_dev *dd = from_tasklet(dd, t, queue_task);
atmel_aes_handle_queue(dd, NULL);
}
-static void atmel_aes_done_task(unsigned long data)
+static void atmel_aes_done_task(struct tasklet_struct *t)
{
- struct atmel_aes_dev *dd = (struct atmel_aes_dev *)data;
+ struct atmel_aes_dev *dd = from_tasklet(dd, t, done_task);
dd->is_async = true;
(void)dd->resume(dd);
@@ -2499,10 +2499,8 @@ static int atmel_aes_probe(struct platform_device *pdev)
INIT_LIST_HEAD(&aes_dd->list);
spin_lock_init(&aes_dd->lock);
- tasklet_init(&aes_dd->done_task, atmel_aes_done_task,
- (unsigned long)aes_dd);
- tasklet_init(&aes_dd->queue_task, atmel_aes_queue_task,
- (unsigned long)aes_dd);
+ tasklet_setup(&aes_dd->done_task, atmel_aes_done_task);
+ tasklet_setup(&aes_dd->queue_task, atmel_aes_queue_task);
crypto_init_queue(&aes_dd->queue, ATMEL_AES_QUEUE_LENGTH);
@@ -1314,9 +1314,9 @@ static struct ahash_alg sha_384_512_algs[] = {
},
};
-static void atmel_sha_queue_task(unsigned long data)
+static void atmel_sha_queue_task(struct tasklet_struct *t)
{
- struct atmel_sha_dev *dd = (struct atmel_sha_dev *)data;
+ struct atmel_sha_dev *dd = from_tasklet(dd, t, queue_task);
atmel_sha_handle_queue(dd, NULL);
}
@@ -1353,9 +1353,9 @@ static int atmel_sha_done(struct atmel_sha_dev *dd)
return err;
}
-static void atmel_sha_done_task(unsigned long data)
+static void atmel_sha_done_task(struct tasklet_struct *t)
{
- struct atmel_sha_dev *dd = (struct atmel_sha_dev *)data;
+ struct atmel_sha_dev *dd = from_tasklet(dd, t, done_task);
dd->is_async = true;
(void)dd->resume(dd);
@@ -2570,10 +2570,8 @@ static int atmel_sha_probe(struct platform_device *pdev)
INIT_LIST_HEAD(&sha_dd->list);
spin_lock_init(&sha_dd->lock);
- tasklet_init(&sha_dd->done_task, atmel_sha_done_task,
- (unsigned long)sha_dd);
- tasklet_init(&sha_dd->queue_task, atmel_sha_queue_task,
- (unsigned long)sha_dd);
+ tasklet_setup(&sha_dd->done_task, atmel_sha_done_task);
+ tasklet_setup(&sha_dd->queue_task, atmel_sha_queue_task);
crypto_init_queue(&sha_dd->queue, ATMEL_SHA_QUEUE_LENGTH);
@@ -1049,16 +1049,16 @@ static struct skcipher_alg tdes_algs[] = {
},
};
-static void atmel_tdes_queue_task(unsigned long data)
+static void atmel_tdes_queue_task(struct tasklet_struct *t)
{
- struct atmel_tdes_dev *dd = (struct atmel_tdes_dev *)data;
+ struct atmel_tdes_dev *dd = from_tasklet(dd, t, queue_task);
atmel_tdes_handle_queue(dd, NULL);
}
-static void atmel_tdes_done_task(unsigned long data)
+static void atmel_tdes_done_task(struct tasklet_struct *t)
{
- struct atmel_tdes_dev *dd = (struct atmel_tdes_dev *) data;
+ struct atmel_tdes_dev *dd = from_tasklet(dd, t, done_task);
int err;
if (!(dd->flags & TDES_FLAGS_DMA))
@@ -1177,10 +1177,8 @@ static int atmel_tdes_probe(struct platform_device *pdev)
INIT_LIST_HEAD(&tdes_dd->list);
spin_lock_init(&tdes_dd->lock);
- tasklet_init(&tdes_dd->done_task, atmel_tdes_done_task,
- (unsigned long)tdes_dd);
- tasklet_init(&tdes_dd->queue_task, atmel_tdes_queue_task,
- (unsigned long)tdes_dd);
+ tasklet_setup(&tdes_dd->done_task, atmel_tdes_done_task);
+ tasklet_setup(&tdes_dd->queue_task, atmel_tdes_queue_task);
crypto_init_queue(&tdes_dd->queue, ATMEL_TDES_QUEUE_LENGTH);