summaryrefslogtreecommitdiffstats
path: root/drivers/crypto/caam/ctrl.c
diff options
context:
space:
mode:
authorAndrey Smirnov <andrew.smirnov@gmail.com>2019-10-22 17:30:11 +0200
committerHerbert Xu <herbert@gondor.apana.org.au>2019-11-01 06:38:30 +0100
commitf414de2e2fffd89c8a4e5b5e06b0eba5f9d8b1eb (patch)
treee47834bfdd42d30a83a6e0d672d42d8b4d690116 /drivers/crypto/caam/ctrl.c
parentcrypto: caam - use devres to de-initialize the RNG (diff)
downloadlinux-f414de2e2fffd89c8a4e5b5e06b0eba5f9d8b1eb.tar.xz
linux-f414de2e2fffd89c8a4e5b5e06b0eba5f9d8b1eb.zip
crypto: caam - use devres to de-initialize QI
Use devres to de-initialize the QI and drop explicit de-initialization code in caam_remove(). Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Reviewed-by: Horia Geantă <horia.geanta@nxp.com> Cc: Chris Healy <cphealy@gmail.com> Cc: Lucas Stach <l.stach@pengutronix.de> Cc: Horia Geantă <horia.geanta@nxp.com> Cc: Herbert Xu <herbert@gondor.apana.org.au> Cc: Iuliana Prodan <iuliana.prodan@nxp.com> Cc: linux-crypto@vger.kernel.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'drivers/crypto/caam/ctrl.c')
-rw-r--r--drivers/crypto/caam/ctrl.c14
1 files changed, 1 insertions, 13 deletions
diff --git a/drivers/crypto/caam/ctrl.c b/drivers/crypto/caam/ctrl.c
index f8c75a999913..7cdb48c7e28e 100644
--- a/drivers/crypto/caam/ctrl.c
+++ b/drivers/crypto/caam/ctrl.c
@@ -332,11 +332,6 @@ static int caam_remove(struct platform_device *pdev)
/* Remove platform devices under the crypto node */
of_platform_depopulate(ctrldev);
-#ifdef CONFIG_CAAM_QI
- if (ctrlpriv->qi_init)
- caam_qi_shutdown(ctrldev);
-#endif
-
return 0;
}
@@ -769,7 +764,7 @@ static int caam_probe(struct platform_device *pdev)
ret = of_platform_populate(nprop, caam_match, NULL, dev);
if (ret) {
dev_err(dev, "JR platform devices creation error\n");
- goto shutdown_qi;
+ return ret;
}
ring = 0;
@@ -930,13 +925,6 @@ static int caam_probe(struct platform_device *pdev)
caam_remove:
caam_remove(pdev);
return ret;
-
-shutdown_qi:
-#ifdef CONFIG_CAAM_QI
- if (ctrlpriv->qi_init)
- caam_qi_shutdown(dev);
-#endif
- return ret;
}
static struct platform_driver caam_driver = {