From: Bo Sun <bo@mboxify.com>
To: barebox@lists.infradead.org
Subject: [PATCH] of: platform: rename parameter 'bus' to 'node' in of_platform_bus_create()
Date: Thu, 17 Jul 2025 21:14:31 +0800 [thread overview]
Message-ID: <20250717131431.1127636-1-bo@mboxify.com> (raw)
The parameter represents a device tree node, not specifically a bus.
Use more accurate naming following device tree conventions.
Signed-off-by: Bo Sun <bo@mboxify.com>
---
drivers/of/platform.c | 18 +++++++++---------
1 file changed, 9 insertions(+), 9 deletions(-)
diff --git a/drivers/of/platform.c b/drivers/of/platform.c
index 3600b5f9c1..092ec39b05 100644
--- a/drivers/of/platform.c
+++ b/drivers/of/platform.c
@@ -399,14 +399,14 @@ static inline struct device *of_amba_device_create(struct device_node *np)
/**
* of_platform_bus_create() - Create a device for a node and its children.
- * @bus: device node of the bus to instantiate
+ * @node: device node of the bus to instantiate
* @matches: match table for bus nodes
* @parent: parent for new device, or NULL for top level.
*
* Creates a platform_device for the provided device_node, and optionally
* recursively create devices for all the child nodes.
*/
-static int of_platform_bus_create(struct device_node *bus,
+static int of_platform_bus_create(struct device_node *node,
const struct of_device_id *matches,
struct device *parent)
{
@@ -415,22 +415,22 @@ static int of_platform_bus_create(struct device_node *bus,
int rc = 0;
/* Make sure it has a compatible property */
- if (!of_get_property(bus, "compatible", NULL)) {
+ if (!of_get_property(node, "compatible", NULL)) {
pr_debug("%s() - skipping %pOF, no compatible prop\n",
- __func__, bus);
+ __func__, node);
return 0;
}
- if (of_device_is_compatible(bus, "arm,primecell")) {
- if (of_amba_device_create(bus))
+ if (of_device_is_compatible(node, "arm,primecell")) {
+ if (of_amba_device_create(node))
return 0;
}
- dev = of_platform_device_create(bus, parent);
- if (!dev || !of_match_node(matches, bus))
+ dev = of_platform_device_create(node, parent);
+ if (!dev || !of_match_node(matches, node))
return 0;
- for_each_child_of_node(bus, child) {
+ for_each_child_of_node(node, child) {
pr_debug(" create child: %pOF\n", child);
rc = of_platform_bus_create(child, matches, dev);
if (rc)
reply other threads:[~2025-07-17 14:17 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20250717131431.1127636-1-bo@mboxify.com \
--to=bo@mboxify.com \
--cc=barebox@lists.infradead.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