From 1f2f980373f0232e5a385ebce0945e7950fd99ce Mon Sep 17 00:00:00 2001 From: Sascha Hauer Date: Tue, 8 Nov 2016 14:35:19 +0100 Subject: of: partitions: Support new binding The new binding recommends to put the partitions into a subnode with compatible "fixed-partitions". Add support for this binding. Signed-off-by: Sascha Hauer --- drivers/of/partition.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'drivers') 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 @@ -79,6 +79,13 @@ int of_parse_partitions(struct cdev *cdev, struct device_node *node) if (!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); } -- cgit v1.2.3