[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20190729221101.228240-8-saravanak@google.com>
Date: Mon, 29 Jul 2019 15:11:01 -0700
From: Saravana Kannan <saravanak@...gle.com>
To: Rob Herring <robh+dt@...nel.org>,
Mark Rutland <mark.rutland@....com>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
"Rafael J. Wysocki" <rafael@...nel.org>,
Frank Rowand <frowand.list@...il.com>
Cc: Saravana Kannan <saravanak@...gle.com>, devicetree@...r.kernel.org,
linux-kernel@...r.kernel.org,
David Collins <collinsd@...eaurora.org>,
kernel-team@...roid.com
Subject: [PATCH v8 7/7] 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@...gle.com>
---
drivers/of/platform.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/of/platform.c b/drivers/of/platform.c
index 41499ddc8d95..676b2f730d1b 100644
--- a/drivers/of/platform.c
+++ b/drivers/of/platform.c
@@ -682,6 +682,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);
}
--
2.22.0.709.g102302147b-goog
Powered by blists - more mailing lists