Browse Source

crypto: picoxcell - 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>
Herbert Xu 10 years ago
parent
commit
9611ef63c2
1 changed files with 2 additions and 1 deletions
  1. 2 1
      drivers/crypto/picoxcell_crypto.c

+ 2 - 1
drivers/crypto/picoxcell_crypto.c

@@ -790,7 +790,8 @@ static int spacc_aead_cra_init(struct crypto_tfm *tfm)
 
 
 	get_random_bytes(ctx->salt, sizeof(ctx->salt));
 	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;
 	return 0;
 }
 }