Commit 5d010473 authored by Sakari Ailus's avatar Sakari Ailus Committed by Rafael J. Wysocki
Browse files

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: default avatarSakari Ailus <sakari.ailus@linux.intel.com>
Reviewed-by: default avatarLaurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Reviewed-by: default avatarJonathan Cameron <jonathan.cameron@huawei.com>
Link: https://patch.msgid.link/20251001104320.1272752-3-sakari.ailus@linux.intel.com


Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
parent 159e8511
Loading
Loading
Loading
Loading
+4 −4
Original line number Diff line number Diff line
@@ -1473,7 +1473,7 @@ static struct fwnode_handle *acpi_graph_get_next_endpoint(

	if (!prev) {
		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@"
			 * 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)
		return NULL;

	endpoint = fwnode_get_next_child_node(port, prev);
	endpoint = acpi_get_next_subnode(port, prev);
	while (!endpoint) {
		port = fwnode_get_next_child_node(fwnode, port);
		port = acpi_get_next_subnode(fwnode, port);
		if (!port)
			break;
		if (is_acpi_graph_node(port, "port"))
			endpoint = fwnode_get_next_child_node(port, NULL);
			endpoint = acpi_get_next_subnode(port, NULL);
	}

	/*