diff options
author | Heikki Krogerus <heikki.krogerus@linux.intel.com> | 2019-05-31 17:15:35 +0300 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2019-06-03 10:55:38 +0200 |
commit | c959d0c231f7063b14d766cfecc1fe90c2ab5061 (patch) | |
tree | 303c742ce363166618aa088d32882f071ed0bc4e /drivers/base/swnode.c | |
parent | 80488a6b1d3c3509b69d38d7c5ac7615889ea7e0 (diff) |
software node: Use kobject name when finding child nodes by name
Using the kobject name of the node instead of a device
property "name" in software_node_get_named_child_node().
Signed-off-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Tested-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'drivers/base/swnode.c')
-rw-r--r-- | drivers/base/swnode.c | 6 |
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; } |