MLK-15473-7: crypto: caam: Fix CAAM driver build for i.MX6
authorAymen Sghaier <aymen.sghaier@nxp.com>
Mon, 13 Nov 2017 09:56:02 +0000 (10:56 +0100)
committerNitin Garg <nitin.garg@nxp.com>
Mon, 19 Mar 2018 20:46:55 +0000 (15:46 -0500)
  Add a check for CONFIG_HAVE_IMX8_SOC befor imx8_get_soc_revision() call
 to avoid i.MX6 build fail. The generic imx_get_soc_revision() call is
 not ready to use.

Reviewed-by: Daniel Baluta <daniel.baluta@nxp.com>
Signed-off-by: Aymen Sghaier <aymen.sghaier@nxp.com>
drivers/crypto/caam/jr.c

index 6d2a50a..6b45774 100644 (file)
@@ -550,8 +550,10 @@ static int caam_jr_probe(struct platform_device *pdev)
                         * with RNG un-instantiated. It is instantiated
                         * here unlike REV_B0 and later.
                         */
+#ifdef CONFIG_HAVE_IMX8_SOC
                        if (imx8_get_soc_revision() == IMX_CHIP_REVISION_1_0)
                                error = inst_rng_imx8(pdev);
+#endif /* CONFIG_HAVE_IMX8_SOC */
                } else {
                        /*
                         * This call is done for legacy SOCs: