crypto: cryptd - Use crypto_aead_set_reqsize helper

This patch uses the crypto_aead_set_reqsize helper to avoid directly
touching the internals of aead.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
This commit is contained in:
Herbert Xu 2015-05-11 17:47:58 +08:00
parent 2c221ad394
commit 529a0b625b
1 changed files with 2 additions and 1 deletions

View File

@ -729,7 +729,8 @@ static int cryptd_aead_init_tfm(struct crypto_tfm *tfm)
crypto_aead_set_flags(cipher, CRYPTO_TFM_REQ_MAY_SLEEP);
ctx->child = cipher;
tfm->crt_aead.reqsize = sizeof(struct cryptd_aead_request_ctx);
crypto_aead_set_reqsize(__crypto_aead_cast(tfm),
sizeof(struct cryptd_aead_request_ctx));
return 0;
}