Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Marcus Folkesson and committed by
Herbert Xu
b80609a1 5937d81a

+3 -3
+3 -3
drivers/crypto/caam/ctrl.c
··· 330 330 clk_disable_unprepare(ctrlpriv->caam_ipg); 331 331 clk_disable_unprepare(ctrlpriv->caam_mem); 332 332 clk_disable_unprepare(ctrlpriv->caam_aclk); 333 - if (!of_machine_is_compatible("fsl,imx6ul")) 333 + if (ctrlpriv->caam_emi_slow) 334 334 clk_disable_unprepare(ctrlpriv->caam_emi_slow); 335 335 return 0; 336 336 } ··· 506 506 goto disable_caam_mem; 507 507 } 508 508 509 - if (!of_machine_is_compatible("fsl,imx6ul")) { 509 + if (ctrlpriv->caam_emi_slow) { 510 510 ret = clk_prepare_enable(ctrlpriv->caam_emi_slow); 511 511 if (ret < 0) { 512 512 dev_err(&pdev->dev, "can't enable CAAM emi slow clock: %d\n", ··· 830 830 iounmap_ctrl: 831 831 iounmap(ctrl); 832 832 disable_caam_emi_slow: 833 - if (!of_machine_is_compatible("fsl,imx6ul")) 833 + if (ctrlpriv->caam_emi_slow) 834 834 clk_disable_unprepare(ctrlpriv->caam_emi_slow); 835 835 disable_caam_aclk: 836 836 clk_disable_unprepare(ctrlpriv->caam_aclk);