crypto_free_skcipher(tfm);
}
-static void cryptd_skcipher_encrypt(struct crypto_async_request *base,
- int err)
+static void cryptd_skcipher_encrypt(void *data, int err)
{
- struct skcipher_request *req = skcipher_request_cast(base);
+ struct skcipher_request *req = data;
struct skcipher_request *subreq;
subreq = cryptd_skcipher_prepare(req, err);
cryptd_skcipher_complete(req, err, cryptd_skcipher_encrypt);
}
-static void cryptd_skcipher_decrypt(struct crypto_async_request *base,
- int err)
+static void cryptd_skcipher_decrypt(void *data, int err)
{
- struct skcipher_request *req = skcipher_request_cast(base);
+ struct skcipher_request *req = data;
struct skcipher_request *subreq;
subreq = cryptd_skcipher_prepare(req, err);
crypto_free_ahash(tfm);
}
-static void cryptd_hash_init(struct crypto_async_request *req_async, int err)
+static void cryptd_hash_init(void *data, int err)
{
- struct ahash_request *req = ahash_request_cast(req_async);
+ struct ahash_request *req = data;
struct crypto_ahash *tfm = crypto_ahash_reqtfm(req);
struct cryptd_hash_ctx *ctx = crypto_ahash_ctx(tfm);
struct crypto_shash *child = ctx->child;
return cryptd_hash_enqueue(req, cryptd_hash_init);
}
-static void cryptd_hash_update(struct crypto_async_request *req_async, int err)
+static void cryptd_hash_update(void *data, int err)
{
- struct ahash_request *req = ahash_request_cast(req_async);
+ struct ahash_request *req = data;
struct shash_desc *desc;
desc = cryptd_hash_prepare(req, err);
return cryptd_hash_enqueue(req, cryptd_hash_update);
}
-static void cryptd_hash_final(struct crypto_async_request *req_async, int err)
+static void cryptd_hash_final(void *data, int err)
{
- struct ahash_request *req = ahash_request_cast(req_async);
+ struct ahash_request *req = data;
struct shash_desc *desc;
desc = cryptd_hash_prepare(req, err);
return cryptd_hash_enqueue(req, cryptd_hash_final);
}
-static void cryptd_hash_finup(struct crypto_async_request *req_async, int err)
+static void cryptd_hash_finup(void *data, int err)
{
- struct ahash_request *req = ahash_request_cast(req_async);
+ struct ahash_request *req = data;
struct shash_desc *desc;
desc = cryptd_hash_prepare(req, err);
return cryptd_hash_enqueue(req, cryptd_hash_finup);
}
-static void cryptd_hash_digest(struct crypto_async_request *req_async, int err)
+static void cryptd_hash_digest(void *data, int err)
{
- struct ahash_request *req = ahash_request_cast(req_async);
+ struct ahash_request *req = data;
struct crypto_ahash *tfm = crypto_ahash_reqtfm(req);
struct cryptd_hash_ctx *ctx = crypto_ahash_ctx(tfm);
struct crypto_shash *child = ctx->child;
crypto_free_aead(tfm);
}
-static void cryptd_aead_encrypt(struct crypto_async_request *areq, int err)
+static void cryptd_aead_encrypt(void *data, int err)
{
- struct cryptd_aead_ctx *ctx = crypto_tfm_ctx(areq->tfm);
- struct crypto_aead *child = ctx->child;
- struct aead_request *req;
+ struct aead_request *req = data;
+ struct cryptd_aead_ctx *ctx;
+ struct crypto_aead *child;
- req = container_of(areq, struct aead_request, base);
+ ctx = crypto_aead_ctx(crypto_aead_reqtfm(req));
+ child = ctx->child;
cryptd_aead_crypt(req, child, err, crypto_aead_alg(child)->encrypt,
cryptd_aead_encrypt);
}
-static void cryptd_aead_decrypt(struct crypto_async_request *areq, int err)
+static void cryptd_aead_decrypt(void *data, int err)
{
- struct cryptd_aead_ctx *ctx = crypto_tfm_ctx(areq->tfm);
- struct crypto_aead *child = ctx->child;
- struct aead_request *req;
+ struct aead_request *req = data;
+ struct cryptd_aead_ctx *ctx;
+ struct crypto_aead *child;
- req = container_of(areq, struct aead_request, base);
+ ctx = crypto_aead_ctx(crypto_aead_reqtfm(req));
+ child = ctx->child;
cryptd_aead_crypt(req, child, err, crypto_aead_alg(child)->decrypt,
cryptd_aead_decrypt);
}