summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHerbert Xu <herbert@gondor.apana.org.au>2020-05-15 06:13:46 +0200
committerHerbert Xu <herbert@gondor.apana.org.au>2020-05-15 06:13:46 +0200
commit9a611a1dce07138c9cb2ac5d3f118e7de44fa774 (patch)
treea06eb9bdf39412263d0254549d863876d447516a
parentcrypto: lib/sha1 - fold linux/cryptohash.h into crypto/sha.h (diff)
downloadlinux-9a611a1dce07138c9cb2ac5d3f118e7de44fa774.tar.xz
linux-9a611a1dce07138c9cb2ac5d3f118e7de44fa774.zip
Revert "ASoC: cros_ec_codec: use crypto_shash_tfm_digest()"
This reverts commit 85fc78b80f15d723db3aa8f368b414ee70a1937c as a different fix has already been applied in the sound-asoc tree and this patch is no longer required. Reported-by: Stephen Rothwell <sfr@canb.auug.org.au> Reported-by: Mark Brown <broonie@kernel.org> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
-rw-r--r--sound/soc/codecs/cros_ec_codec.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/sound/soc/codecs/cros_ec_codec.c b/sound/soc/codecs/cros_ec_codec.c
index bfdd852bdc0d..d3dc42aa6825 100644
--- a/sound/soc/codecs/cros_ec_codec.c
+++ b/sound/soc/codecs/cros_ec_codec.c
@@ -115,7 +115,14 @@ static int calculate_sha256(struct cros_ec_codec_priv *priv,
return PTR_ERR(tfm);
}
- crypto_shash_tfm_digest(tfm, buf, size, digest);
+ {
+ SHASH_DESC_ON_STACK(desc, tfm);
+
+ desc->tfm = tfm;
+
+ crypto_shash_digest(desc, buf, size, digest);
+ shash_desc_zero(desc);
+ }
crypto_free_shash(tfm);