summaryrefslogtreecommitdiffstats
path: root/drivers/crypto/caam/ctrl.c
diff options
context:
space:
mode:
authorMarcus Folkesson <marcus.folkesson@gmail.com>2016-11-28 18:53:28 +0100
committerHerbert Xu <herbert@gondor.apana.org.au>2016-12-07 13:01:08 +0100
commitb80609a161f05caec677216f74188701a3b23149 (patch)
tree240f432e0c8abbbb7b91e8726255a79442fc7039 /drivers/crypto/caam/ctrl.c
parentcrypto: algif_aead - fix AIO handling of zero buffer (diff)
downloadlinux-b80609a161f05caec677216f74188701a3b23149.tar.xz
linux-b80609a161f05caec677216f74188701a3b23149.zip
crypto: caam - check caam_emi_slow instead of re-lookup platform
Signed-off-by: Marcus Folkesson <marcus.folkesson@gmail.com> 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.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/crypto/caam/ctrl.c b/drivers/crypto/caam/ctrl.c
index be62a7f482ac..d5ca5b824641 100644
--- a/drivers/crypto/caam/ctrl.c
+++ b/drivers/crypto/caam/ctrl.c
@@ -330,7 +330,7 @@ static int caam_remove(struct platform_device *pdev)
clk_disable_unprepare(ctrlpriv->caam_ipg);
clk_disable_unprepare(ctrlpriv->caam_mem);
clk_disable_unprepare(ctrlpriv->caam_aclk);
- if (!of_machine_is_compatible("fsl,imx6ul"))
+ if (ctrlpriv->caam_emi_slow)
clk_disable_unprepare(ctrlpriv->caam_emi_slow);
return 0;
}
@@ -506,7 +506,7 @@ static int caam_probe(struct platform_device *pdev)
goto disable_caam_mem;
}
- if (!of_machine_is_compatible("fsl,imx6ul")) {
+ if (ctrlpriv->caam_emi_slow) {
ret = clk_prepare_enable(ctrlpriv->caam_emi_slow);
if (ret < 0) {
dev_err(&pdev->dev, "can't enable CAAM emi slow clock: %d\n",
@@ -830,7 +830,7 @@ caam_remove:
iounmap_ctrl:
iounmap(ctrl);
disable_caam_emi_slow:
- if (!of_machine_is_compatible("fsl,imx6ul"))
+ if (ctrlpriv->caam_emi_slow)
clk_disable_unprepare(ctrlpriv->caam_emi_slow);
disable_caam_aclk:
clk_disable_unprepare(ctrlpriv->caam_aclk);