summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2019-08-27 22:40:35 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2019-08-27 22:40:35 +0300
commitb1c46e118b21dfaa4112a897ead12d7b141cb83b (patch)
tree4d597b8cb2cfe12f1a9aa4236180b40cc01da908
parent40e05e6acdc07f1a513f206c1a8c5fce16ae5a81 (diff)
downloadlinux-b1c46e118b21dfaa4112a897ead12d7b141cb83b.tar.xz
Revert "of/platform: Create device links for all child-supplier depencencies"
This reverts commit 709fb8297358f08a125b770d1518a95d03b541db. Based on a lot of email and in-person discussions, this patch series is being reworked to address a number of issues that were pointed out that needed to be taken care of before it should be merged. It will be resubmitted with those changes hopefully soon. Cc: Frank Rowand <frowand.list@gmail.com> Cc: Saravana Kannan <saravanak@google.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--drivers/of/platform.c27
1 files changed, 8 insertions, 19 deletions
diff --git a/drivers/of/platform.c b/drivers/of/platform.c
index 52590fb20422..ae85a88ba53e 100644
--- a/drivers/of/platform.c
+++ b/drivers/of/platform.c
@@ -650,35 +650,24 @@ static bool of_link_property(struct device *dev, struct device_node *con_np,
return done ? 0 : -ENODEV;
}
-static int __of_link_to_suppliers(struct device *dev,
- struct device_node *con_np)
-{
- struct device_node *child;
- struct property *p;
- bool done = true;
-
- for_each_property_of_node(con_np, p)
- if (of_link_property(dev, con_np, p->name))
- done = false;
-
- for_each_child_of_node(con_np, child)
- if (__of_link_to_suppliers(dev, child))
- done = false;
-
- return done ? 0 : -ENODEV;
-}
-
static bool of_devlink;
core_param(of_devlink, of_devlink, bool, 0);
static int of_link_to_suppliers(struct device *dev)
{
+ struct property *p;
+ bool done = true;
+
if (!of_devlink)
return 0;
if (unlikely(!dev->of_node))
return 0;
- return __of_link_to_suppliers(dev, dev->of_node);
+ for_each_property_of_node(dev->of_node, p)
+ if (of_link_property(dev, dev->of_node, p->name))
+ done = false;
+
+ return done ? 0 : -ENODEV;
}
#ifndef CONFIG_PPC