Revert "ASoC: cros_ec_codec: use crypto_shash_tfm_digest()"

This reverts commit 85fc78b80f 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>
This commit is contained in:
Herbert Xu 2020-05-15 14:13:46 +10:00
parent 228c4f265c
commit 9a611a1dce

View File

@ -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);