summaryrefslogtreecommitdiffstats
path: root/drivers/of
diff options
context:
space:
mode:
authorSaravana Kannan <saravanak@google.com>2019-07-31 15:17:20 -0700
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2019-08-01 16:04:14 +0200
commitb3173c2292fbaf24ff7062d366830b012ed04269 (patch)
tree8c17236a76c30fe2088c1653c149572dc2b33fe9 /drivers/of
parent709fb8297358f08a125b770d1518a95d03b541db (diff)
downloadlinux-stable-b3173c2292fbaf24ff7062d366830b012ed04269.tar.gz
linux-stable-b3173c2292fbaf24ff7062d366830b012ed04269.tar.bz2
linux-stable-b3173c2292fbaf24ff7062d366830b012ed04269.zip
of/platform: Don't create device links for default busses
Default busses also have devices created for them. But there's no point in creating device links for them. It's especially wasteful as it'll cause the traversal of the entire device tree and also spend a lot of time checking and figuring out that creating those links isn't allowed. So check for default busses and skip trying to create device links for them. Signed-off-by: Saravana Kannan <saravanak@google.com> Link: https://lore.kernel.org/r/20190731221721.187713-8-saravanak@google.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/of')
-rw-r--r--drivers/of/platform.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/of/platform.c b/drivers/of/platform.c
index 52590fb20422..21838226d68a 100644
--- a/drivers/of/platform.c
+++ b/drivers/of/platform.c
@@ -677,6 +677,8 @@ static int of_link_to_suppliers(struct device *dev)
return 0;
if (unlikely(!dev->of_node))
return 0;
+ if (of_match_node(of_default_bus_match_table, dev->of_node))
+ return 0;
return __of_link_to_suppliers(dev, dev->of_node);
}