summaryrefslogtreecommitdiff
path: root/drivers/crypto/caam
diff options
context:
space:
mode:
authorDan Douglass <dan.douglass@freescale.com>2016-01-20 13:31:56 -0600
committerLeonard Crestez <leonard.crestez@nxp.com>2018-08-24 12:41:33 +0300
commitc7d239d3ead2805b0c0be9e307e5e4482cc4da62 (patch)
treee626b5f5a6f3c0f59c5568eca97d2ea8703b13fa /drivers/crypto/caam
parent239ee505e75d6f4217e9f68310ed1673cafcd0d0 (diff)
MLK-12302 caam: Secure Memory platform device creation crashes
There is new flag that is checked in of_platform_device_create(). The flag is cleared prior to the call now so the device creates successfully. Signed-off-by: Dan Douglass <dan.douglass@nxp.com>
Diffstat (limited to 'drivers/crypto/caam')
-rw-r--r--drivers/crypto/caam/sm_store.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/crypto/caam/sm_store.c b/drivers/crypto/caam/sm_store.c
index 21d4d82157c1..2af1e5c61850 100644
--- a/drivers/crypto/caam/sm_store.c
+++ b/drivers/crypto/caam/sm_store.c
@@ -36,6 +36,7 @@
#include "intern.h"
#include "error.h"
#include "sm.h"
+#include <linux/of_address.h>
#define SECMEM_KEYMOD_LEN 8
#define GENMEM_KEYMOD_LEN 16
@@ -1013,6 +1014,8 @@ int caam_sm_startup(struct platform_device *pdev)
/* Create the dev */
#ifdef CONFIG_OF
np = of_find_compatible_node(NULL, NULL, "fsl,imx6q-caam-sm");
+ if (np)
+ of_node_clear_flag(np, OF_POPULATED);
sm_pdev = of_platform_device_create(np, "caam_sm", ctrldev);
#else
sm_pdev = platform_device_register_data(ctrldev, "caam_sm", 0,