summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--drivers/of/fdt.c6
-rw-r--r--drivers/of/pdt.c5
2 files changed, 11 insertions, 0 deletions
diff --git a/drivers/of/fdt.c b/drivers/of/fdt.c
index 96ad1ab7f9d6..3531a43d7d3e 100644
--- a/drivers/of/fdt.c
+++ b/drivers/of/fdt.c
@@ -202,6 +202,12 @@ static void * unflatten_dt_node(struct boot_param_header *blob,
__alignof__(struct device_node));
if (allnextpp) {
char *fn;
+
+ /* of_node_init(np); throws runtime errors
+ * 'tried to init an initialized object'
+ * thus only set the type here. Sideeffect from backporting extcon */
+ np->fwnode.type = FWNODE_OF;
+
np->full_name = fn = ((char *)np) + sizeof(*np);
if (new_format) {
/* rebuild full path for new format */
diff --git a/drivers/of/pdt.c b/drivers/of/pdt.c
index e64fa3d3da5f..38de38601429 100644
--- a/drivers/of/pdt.c
+++ b/drivers/of/pdt.c
@@ -176,6 +176,11 @@ static struct device_node * __init of_pdt_create_node(phandle node,
return NULL;
dp = prom_early_alloc(sizeof(*dp));
+ /* of_node_init(np); likely will throw runtime errors
+ * 'tried to init an initialized object'
+ * thus only set the type here. Sideeffect from backporting extcon */
+ np->fwnode.type = FWNODE_OF;
+
of_pdt_incr_unique_id(dp);
dp->parent = parent;