aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/base/swnode.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/base/swnode.c')
-rw-r--r--drivers/base/swnode.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/drivers/base/swnode.c b/drivers/base/swnode.c
index ef1a48fec718..2d925fc2255f 100644
--- a/drivers/base/swnode.c
+++ b/drivers/base/swnode.c
@@ -546,17 +546,13 @@ software_node_get_named_child_node(const struct fwnode_handle *fwnode,
const char *childname)
{
struct swnode *swnode = to_swnode(fwnode);
- const struct property_entry *prop;
struct swnode *child;
if (!swnode || list_empty(&swnode->children))
return NULL;
list_for_each_entry(child, &swnode->children, entry) {
- prop = property_entry_get(child->node->properties, "name");
- if (!prop)
- continue;
- if (!strcmp(childname, prop->value.str)) {
+ if (!strcmp(childname, kobject_name(&child->kobj))) {
kobject_get(&child->kobj);
return &child->fwnode;
}