diff options
Diffstat (limited to 'drivers/of')
-rw-r--r-- | drivers/of/of_path.c | 7 | ||||
-rw-r--r-- | drivers/of/partition.c | 7 |
2 files changed, 13 insertions, 1 deletions
diff --git a/drivers/of/of_path.c b/drivers/of/of_path.c index 8e1931f939..1f5106df55 100644 --- a/drivers/of/of_path.c +++ b/drivers/of/of_path.c @@ -56,7 +56,12 @@ static int __of_find_path(struct device_node *node, const char *part, char **out dev = of_find_device_by_node_path(node->full_name); if (!dev) { - dev = of_find_device_by_node_path(node->parent->full_name); + struct device_node *devnode = node->parent; + + if (of_device_is_compatible(devnode, "fixed-partitions")) + devnode = devnode->parent; + + dev = of_find_device_by_node_path(devnode->full_name); if (!dev) return -ENODEV; } diff --git a/drivers/of/partition.c b/drivers/of/partition.c index b6621f7dad..bdf5945627 100644 --- a/drivers/of/partition.c +++ b/drivers/of/partition.c @@ -80,6 +80,13 @@ int of_parse_partitions(struct cdev *cdev, struct device_node *node) return -EINVAL; for_each_child_of_node(node, n) { + if (of_device_is_compatible(n, "fixed-partitions")) { + node = n; + break; + } + } + + for_each_child_of_node(node, n) { of_parse_partition(cdev, n); } |