aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/crypto
diff options
context:
space:
mode:
authorRussell King <rmk+kernel@arm.linux.org.uk>2015-10-18 12:23:30 -0400
committerHerbert Xu <herbert@gondor.apana.org.au>2015-10-20 10:10:49 -0400
commit80754539ec936b0afe8a3c406b7d67612977cc71 (patch)
treeecc939c0821df7590ab7fe8bf0423681c40c0987 /drivers/crypto
parent524e56c31a6fe21e6f6f543360359e7a97dfabfb (diff)
crypto: marvell/cesa - easier way to get the transform
There's an easier way to get at the hash transform - rather than using crypto_ahash_tfm(ahash), we can get it directly from req->base.tfm. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'drivers/crypto')
-rw-r--r--drivers/crypto/marvell/hash.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/crypto/marvell/hash.c b/drivers/crypto/marvell/hash.c
index 5e0e102ecbfc..40241fd822c6 100644
--- a/drivers/crypto/marvell/hash.c
+++ b/drivers/crypto/marvell/hash.c
@@ -805,7 +805,7 @@ static int mv_cesa_ahash_export(struct ahash_request *req, void *hash,
805 unsigned int digsize = crypto_ahash_digestsize(ahash); 805 unsigned int digsize = crypto_ahash_digestsize(ahash);
806 unsigned int blocksize; 806 unsigned int blocksize;
807 807
808 blocksize = crypto_tfm_alg_blocksize(crypto_ahash_tfm(ahash)); 808 blocksize = crypto_ahash_blocksize(ahash);
809 809
810 *len = creq->len; 810 *len = creq->len;
811 memcpy(hash, creq->state, digsize); 811 memcpy(hash, creq->state, digsize);
@@ -830,7 +830,7 @@ static int mv_cesa_ahash_import(struct ahash_request *req, const void *hash,
830 if (ret) 830 if (ret)
831 return ret; 831 return ret;
832 832
833 blocksize = crypto_tfm_alg_blocksize(crypto_ahash_tfm(ahash)); 833 blocksize = crypto_ahash_blocksize(ahash);
834 if (len >= blocksize) 834 if (len >= blocksize)
835 mv_cesa_update_op_cfg(&creq->op_tmpl, 835 mv_cesa_update_op_cfg(&creq->op_tmpl,
836 CESA_SA_DESC_CFG_MID_FRAG, 836 CESA_SA_DESC_CFG_MID_FRAG,