From 9a611a1dce07138c9cb2ac5d3f118e7de44fa774 Mon Sep 17 00:00:00 2001 From: Herbert Xu Date: Fri, 15 May 2020 14:13:46 +1000 Subject: [PATCH] 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 Reported-by: Mark Brown Signed-off-by: Herbert Xu --- sound/soc/codecs/cros_ec_codec.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) 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);