Skip to content

Commit e8a5c33

Browse files
Sakari Ailusopsiff
authored andcommitted
ACPI: property: Use ACPI functions in acpi_graph_get_next_endpoint() only
[ Upstream commit 5d01047 ] 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> Signed-off-by: Sasha Levin <sashal@kernel.org> (cherry picked from commit 29014a19d4176067b88aecc25a483fc525e1ef97) Signed-off-by: Wentao Guan <guanwentao@uniontech.com>
1 parent 84de19a commit e8a5c33

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
@@ -1472,7 +1472,7 @@ static struct fwnode_handle *acpi_graph_get_next_endpoint(
14721472

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

1493-
endpoint = fwnode_get_next_child_node(port, prev);
1493+
endpoint = acpi_get_next_subnode(port, prev);
14941494
while (!endpoint) {
1495-
port = fwnode_get_next_child_node(fwnode, port);
1495+
port = acpi_get_next_subnode(fwnode, port);
14961496
if (!port)
14971497
break;
14981498
if (is_acpi_graph_node(port, "port"))
1499-
endpoint = fwnode_get_next_child_node(port, NULL);
1499+
endpoint = acpi_get_next_subnode(port, NULL);
15001500
}
15011501

15021502
/*

0 commit comments

Comments
 (0)