diff options
author | Herbert Xu <herbert@gondor.apana.org.au> | 2015-05-11 05:48:01 -0400 |
---|---|---|
committer | Herbert Xu <herbert@gondor.apana.org.au> | 2015-05-12 22:31:41 -0400 |
commit | fd0de97890d88b979c2731bd5b70d504175fc2ed (patch) | |
tree | 50be4a857b208c2f1fa33437a97a5c26fab1694e /crypto/pcrypt.c | |
parent | 5d72336f1b2c8516828c4c7748bdd3ec8a4938da (diff) |
crypto: pcrypt - 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>
Diffstat (limited to 'crypto/pcrypt.c')
-rw-r--r-- | crypto/pcrypt.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/crypto/pcrypt.c b/crypto/pcrypt.c index c305d4112735..ac115d591d66 100644 --- a/crypto/pcrypt.c +++ b/crypto/pcrypt.c | |||
@@ -292,9 +292,10 @@ static int pcrypt_aead_init_tfm(struct crypto_tfm *tfm) | |||
292 | return PTR_ERR(cipher); | 292 | return PTR_ERR(cipher); |
293 | 293 | ||
294 | ctx->child = cipher; | 294 | ctx->child = cipher; |
295 | tfm->crt_aead.reqsize = sizeof(struct pcrypt_request) | 295 | crypto_aead_set_reqsize(__crypto_aead_cast(tfm), |
296 | + sizeof(struct aead_givcrypt_request) | 296 | sizeof(struct pcrypt_request) + |
297 | + crypto_aead_reqsize(cipher); | 297 | sizeof(struct aead_givcrypt_request) + |
298 | crypto_aead_reqsize(cipher)); | ||
298 | 299 | ||
299 | return 0; | 300 | return 0; |
300 | } | 301 | } |