--- a/drivers/mtd/parsers/ofpart_core.c
+++ b/drivers/mtd/parsers/ofpart_core.c
-@@ -33,6 +33,38 @@ static bool node_has_compatible(struct d
+@@ -38,6 +38,38 @@ static bool node_has_compatible(struct d
return of_get_property(pp, "compatible", NULL);
}
static int parse_fixed_partitions(struct mtd_info *master,
const struct mtd_partition **pparts,
struct mtd_part_parser_data *data)
-@@ -46,6 +78,8 @@ static int parse_fixed_partitions(struct
+@@ -51,6 +83,8 @@ static int parse_fixed_partitions(struct
struct device_node *pp;
int nr_parts, i, ret = 0;
bool dedicated = true;
/* Pull of_node from the master device node */
mtd_node = mtd_get_of_node(master);
-@@ -88,7 +122,9 @@ static int parse_fixed_partitions(struct
+@@ -93,7 +127,9 @@ static int parse_fixed_partitions(struct
return 0;
parts = kcalloc(nr_parts, sizeof(*parts), GFP_KERNEL);
return -ENOMEM;
i = 0;
-@@ -137,6 +173,11 @@ static int parse_fixed_partitions(struct
+@@ -142,6 +178,11 @@ static int parse_fixed_partitions(struct
if (of_get_property(pp, "lock", &len))
parts[i].mask_flags |= MTD_POWERUP_LOCK;
i++;
}
-@@ -146,6 +187,11 @@ static int parse_fixed_partitions(struct
+@@ -151,6 +192,11 @@ static int parse_fixed_partitions(struct
if (quirks && quirks->post_parse)
quirks->post_parse(master, parts, nr_parts);
*pparts = parts;
return nr_parts;
-@@ -156,6 +202,7 @@ ofpart_fail:
+@@ -161,6 +207,7 @@ ofpart_fail:
ofpart_none:
of_node_put(pp);
kfree(parts);