ACPI: property: Use ACPI functions in acpi_graph_get_next_endpoint() only

Calling fwnode_get_next_child_node() in ACPI implementation of the fwnode
property API is somewhat problematic as the latter is used in the
impelementation of the former. Instead of using
fwnode_get_next_child_node() in acpi_graph_get_next_endpoint(), call
acpi_get_next_subnode() directly instead.

Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Reviewed-by: Jonathan Cameron <jonathan.cameron@huawei.com>
Link: https://patch.msgid.link/20251001104320.1272752-3-sakari.ailus@linux.intel.com
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
This commit is contained in:
Sakari Ailus 2025-10-01 13:43:19 +03:00 committed by Rafael J. Wysocki
parent 159e851108
commit 5d010473cd
1 changed files with 4 additions and 4 deletions

View File

@ -1473,7 +1473,7 @@ static struct fwnode_handle *acpi_graph_get_next_endpoint(
if (!prev) { if (!prev) {
do { do {
port = fwnode_get_next_child_node(fwnode, port); port = acpi_get_next_subnode(fwnode, port);
/* /*
* The names of the port nodes begin with "port@" * The names of the port nodes begin with "port@"
* followed by the number of the port node and they also * followed by the number of the port node and they also
@ -1491,13 +1491,13 @@ static struct fwnode_handle *acpi_graph_get_next_endpoint(
if (!port) if (!port)
return NULL; return NULL;
endpoint = fwnode_get_next_child_node(port, prev); endpoint = acpi_get_next_subnode(port, prev);
while (!endpoint) { while (!endpoint) {
port = fwnode_get_next_child_node(fwnode, port); port = acpi_get_next_subnode(fwnode, port);
if (!port) if (!port)
break; break;
if (is_acpi_graph_node(port, "port")) if (is_acpi_graph_node(port, "port"))
endpoint = fwnode_get_next_child_node(port, NULL); endpoint = acpi_get_next_subnode(port, NULL);
} }
/* /*