crypto: seqiv - Use crypto_aead_set_reqsize helper
authorHerbert Xu <herbert@gondor.apana.org.au>
Mon, 11 May 2015 09:48:03 +0000 (17:48 +0800)
committerHerbert Xu <herbert@gondor.apana.org.au>
Wed, 13 May 2015 02:31:41 +0000 (10:31 +0800)
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>
crypto/seqiv.c

index b7bb9a2f4a31c095d7a39fe1762d9a2ad88f06cf..5bbf2e9e3ce5535e7985dd42ea3044f19ce9ed62 100644 (file)
@@ -251,7 +251,8 @@ static int seqiv_aead_init(struct crypto_tfm *tfm)
 
        spin_lock_init(&ctx->lock);
 
-       tfm->crt_aead.reqsize = sizeof(struct aead_request);
+       crypto_aead_set_reqsize(__crypto_aead_cast(tfm),
+                               sizeof(struct aead_request));
 
        return aead_geniv_init(tfm);
 }