From: Sascha Hauer <s.hauer@pengutronix.de>
To: "open list:BAREBOX" <barebox@lists.infradead.org>
Subject: [PATCH 4/5] of: of_graph: fix of_graph_get_next_endpoint()
Date: Wed, 25 Sep 2024 16:01:14 +0200 [thread overview]
Message-ID: <20240925-of-graph-fixes-v1-4-c0a3ac989b0c@pengutronix.de> (raw)
In-Reply-To: <20240925-of-graph-fixes-v1-0-c0a3ac989b0c@pengutronix.de>
of_node_cmp() compares the whole node name for matching whereas
of_node_name_eq() only compares the part before the '@' sign. For
of_graph_get_next_endpoint() we need the latter. Fix this.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
drivers/of/base.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/of/base.c b/drivers/of/base.c
index 398e39340f..5981650f2a 100644
--- a/drivers/of/base.c
+++ b/drivers/of/base.c
@@ -3353,7 +3353,7 @@ struct device_node *of_graph_get_next_endpoint(const struct device_node *parent,
port = of_get_next_child(parent, port);
if (!port)
return NULL;
- } while (of_node_cmp(port->name, "port"));
+ } while (port->name && !of_node_name_eq(port, "port"));
}
}
EXPORT_SYMBOL(of_graph_get_next_endpoint);
--
2.39.5
next prev parent reply other threads:[~2024-09-25 14:01 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-09-25 14:01 [PATCH 0/5] of-graph fixes Sascha Hauer
2024-09-25 14:01 ` [PATCH 1/5] of: fix of_get_next_child() for prev->parent != node Sascha Hauer
2024-09-25 14:01 ` [PATCH 2/5] of: fix of_graph_get_next_endpoint() Sascha Hauer
2024-09-25 14:01 ` [PATCH 3/5] of: of_graph: honour ports subnode Sascha Hauer
2024-09-25 14:01 ` Sascha Hauer [this message]
2024-09-25 14:01 ` [PATCH 5/5] of: of_graph: add missing functions Sascha Hauer
2024-09-27 10:39 ` [PATCH 0/5] of-graph fixes Sascha Hauer
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=20240925-of-graph-fixes-v1-4-c0a3ac989b0c@pengutronix.de \
--to=s.hauer@pengutronix.de \
--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