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

index 135817fd7b2dedae571738a78cd9fddb0146c4bb..eb2a0ca49eda4f65715586f22c8f866f67f66f82 100644 (file)
@@ -790,7 +790,8 @@ static int spacc_aead_cra_init(struct crypto_tfm *tfm)
 
        get_random_bytes(ctx->salt, sizeof(ctx->salt));
 
-       tfm->crt_aead.reqsize = sizeof(struct spacc_req);
+       crypto_aead_set_reqsize(__crypto_aead_cast(tfm),
+                               sizeof(struct spacc_req));
 
        return 0;
 }