Skip to content

Commit 5d01047

Browse files
Sakari Ailusrafaeljw
authored andcommitted
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>
1 parent 159e851 commit 5d01047

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

drivers/acpi/property.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1473,7 +1473,7 @@ static struct fwnode_handle *acpi_graph_get_next_endpoint(
14731473

14741474
if (!prev) {
14751475
do {
1476-
port = fwnode_get_next_child_node(fwnode, port);
1476+
port = acpi_get_next_subnode(fwnode, port);
14771477
/*
14781478
* The names of the port nodes begin with "port@"
14791479
* followed by the number of the port node and they also
@@ -1491,13 +1491,13 @@ static struct fwnode_handle *acpi_graph_get_next_endpoint(
14911491
if (!port)
14921492
return NULL;
14931493

1494-
endpoint = fwnode_get_next_child_node(port, prev);
1494+
endpoint = acpi_get_next_subnode(port, prev);
14951495
while (!endpoint) {
1496-
port = fwnode_get_next_child_node(fwnode, port);
1496+
port = acpi_get_next_subnode(fwnode, port);
14971497
if (!port)
14981498
break;
14991499
if (is_acpi_graph_node(port, "port"))
1500-
endpoint = fwnode_get_next_child_node(port, NULL);
1500+
endpoint = acpi_get_next_subnode(port, NULL);
15011501
}
15021502

15031503
/*

0 commit comments

Comments
 (0)