@@ -4110,18 +4110,7 @@ EXPORT_SYMBOL_GPL(device_find_child);
struct device *device_find_child_by_name(struct device *parent,
const char *name)
{
- struct klist_iter i;
- struct device *child;
-
- if (!parent)
- return NULL;
-
- klist_iter_init(&parent->p->klist_children, &i);
- while ((child = next_device(&i)))
- if (sysfs_streq(dev_name(child), name) && get_device(child))
- break;
- klist_iter_exit(&i);
- return child;
+ return device_find_child(parent, name, device_match_name);
}
EXPORT_SYMBOL_GPL(device_find_child_by_name);