Commit cbdd865a authored by Heikki Krogerus's avatar Heikki Krogerus Committed by Rafael J. Wysocki

ACPI: property: use cached name in acpi_fwnode_get_named_child_node()

There is no need to re-evaluate the object name.
Signed-off-by: default avatarHeikki Krogerus <heikki.krogerus@linux.intel.com>
Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
parent 48778464
...@@ -606,13 +606,7 @@ static struct fwnode_handle * ...@@ -606,13 +606,7 @@ static struct fwnode_handle *
acpi_fwnode_get_named_child_node(const struct fwnode_handle *fwnode, acpi_fwnode_get_named_child_node(const struct fwnode_handle *fwnode,
const char *childname) const char *childname)
{ {
char name[ACPI_PATH_SEGMENT_LENGTH];
struct fwnode_handle *child; struct fwnode_handle *child;
struct acpi_buffer path;
acpi_status status;
path.length = sizeof(name);
path.pointer = name;
fwnode_for_each_child_node(fwnode, child) { fwnode_for_each_child_node(fwnode, child) {
if (is_acpi_data_node(child)) { if (is_acpi_data_node(child)) {
...@@ -621,12 +615,8 @@ acpi_fwnode_get_named_child_node(const struct fwnode_handle *fwnode, ...@@ -621,12 +615,8 @@ acpi_fwnode_get_named_child_node(const struct fwnode_handle *fwnode,
continue; continue;
} }
status = acpi_get_name(ACPI_HANDLE_FWNODE(child), if (!strncmp(acpi_device_bid(to_acpi_device_node(child)),
ACPI_SINGLE_NAME, &path); childname, ACPI_NAMESEG_SIZE))
if (ACPI_FAILURE(status))
break;
if (!strncmp(name, childname, ACPI_NAMESEG_SIZE))
return child; return child;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment