summaryrefslogtreecommitdiffstats
path: root/drivers/crypto/rockchip/rk3288_crypto_ahash.c
diff options
context:
space:
mode:
authorCorentin Labbe <clabbe@baylibre.com>2022-09-27 07:54:41 +0000
committerHerbert Xu <herbert@gondor.apana.org.au>2022-10-28 12:36:32 +0800
commitc50ef1411c8cbad0c7db100c477126076b6e3348 (patch)
tree11196cf2091c3b9b56fb3e70d842ec569f596044 /drivers/crypto/rockchip/rk3288_crypto_ahash.c
parent8ccd9c8cd1d1618f5e073c86ffcfe15f292eefe6 (diff)
downloadlinux-stable-c50ef1411c8cbad0c7db100c477126076b6e3348.tar.gz
linux-stable-c50ef1411c8cbad0c7db100c477126076b6e3348.tar.bz2
linux-stable-c50ef1411c8cbad0c7db100c477126076b6e3348.zip
crypto: rockchip - do not do custom power management
The clock enable/disable at tfm init/exit is fragile, if 2 tfm are init in the same time and one is removed just after, it will leave the hardware uncloked even if a user remains. Instead simply enable clocks at probe time. We will do PM later. Fixes: ce0183cb6464b ("crypto: rockchip - switch to skcipher API") Reviewed-by: John Keeping <john@metanate.com> Signed-off-by: Corentin Labbe <clabbe@baylibre.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'drivers/crypto/rockchip/rk3288_crypto_ahash.c')
-rw-r--r--drivers/crypto/rockchip/rk3288_crypto_ahash.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/crypto/rockchip/rk3288_crypto_ahash.c b/drivers/crypto/rockchip/rk3288_crypto_ahash.c
index ed03058497bc..49017d1fb510 100644
--- a/drivers/crypto/rockchip/rk3288_crypto_ahash.c
+++ b/drivers/crypto/rockchip/rk3288_crypto_ahash.c
@@ -301,7 +301,7 @@ static int rk_cra_hash_init(struct crypto_tfm *tfm)
sizeof(struct rk_ahash_rctx) +
crypto_ahash_reqsize(tctx->fallback_tfm));
- return tctx->dev->enable_clk(tctx->dev);
+ return 0;
}
static void rk_cra_hash_exit(struct crypto_tfm *tfm)
@@ -309,7 +309,6 @@ static void rk_cra_hash_exit(struct crypto_tfm *tfm)
struct rk_ahash_ctx *tctx = crypto_tfm_ctx(tfm);
free_page((unsigned long)tctx->dev->addr_vir);
- return tctx->dev->disable_clk(tctx->dev);
}
struct rk_crypto_tmp rk_ahash_sha1 = {