linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Saravana Kannan <saravanak@google.com>
To: Rob Herring <robh+dt@kernel.org>,
	Mark Rutland <mark.rutland@arm.com>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	"Rafael J. Wysocki" <rafael@kernel.org>,
	Frank Rowand <frowand.list@gmail.com>
Cc: Saravana Kannan <saravanak@google.com>,
	devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
	David Collins <collinsd@codeaurora.org>,
	kernel-team@android.com
Subject: [PATCH v6 7/7] of/platform: Don't create device links for default busses
Date: Fri, 19 Jul 2019 23:16:46 -0700	[thread overview]
Message-ID: <20190720061647.234852-8-saravanak@google.com> (raw)
In-Reply-To: <20190720061647.234852-1-saravanak@google.com>

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>
---
 drivers/of/platform.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/of/platform.c b/drivers/of/platform.c
index c1a116f7a087..8bf975ee2ff7 100644
--- a/drivers/of/platform.c
+++ b/drivers/of/platform.c
@@ -676,6 +676,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.657.g960e92d24f-goog


  parent reply	other threads:[~2019-07-20  6:17 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-07-20  6:16 [PATCH v6 0/7] Solve postboot supplier cleanup and optimize probe ordering Saravana Kannan
2019-07-20  6:16 ` [PATCH v6 1/7] driver core: Add support for linking devices during device addition Saravana Kannan
2019-07-20  6:16 ` [PATCH v6 2/7] driver core: Add edit_links() callback for drivers Saravana Kannan
2019-07-20  6:16 ` [PATCH v6 3/7] of/platform: Add functional dependency link from DT bindings Saravana Kannan
2019-07-23 18:06   ` Rob Herring
2019-07-23 20:48     ` Saravana Kannan
2019-07-23 22:18       ` Rob Herring
2019-07-23 23:57         ` Saravana Kannan
2019-07-20  6:16 ` [PATCH v6 4/7] driver core: Add sync_state driver/bus callback Saravana Kannan
2019-07-20  6:16 ` [PATCH v6 5/7] of/platform: Pause/resume sync state during init and of_platform_populate() Saravana Kannan
2019-07-20  6:16 ` [PATCH v6 6/7] of/platform: Create device links for all child-supplier depencencies Saravana Kannan
2019-07-20  6:16 ` Saravana Kannan [this message]
2019-07-22 23:47 ` [PATCH v6 0/7] Solve postboot supplier cleanup and optimize probe ordering Saravana Kannan

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190720061647.234852-8-saravanak@google.com \
    --to=saravanak@google.com \
    --cc=collinsd@codeaurora.org \
    --cc=devicetree@vger.kernel.org \
    --cc=frowand.list@gmail.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=kernel-team@android.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=rafael@kernel.org \
    --cc=robh+dt@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).