aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/regulator/of_regulator.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/regulator/of_regulator.c')
-rw-r--r--drivers/regulator/of_regulator.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/drivers/regulator/of_regulator.c b/drivers/regulator/of_regulator.c
index 06c0b15fe4c0..564f928eb1db 100644
--- a/drivers/regulator/of_regulator.c
+++ b/drivers/regulator/of_regulator.c
@@ -413,8 +413,12 @@ device_node *regulator_of_get_init_node(struct device *dev,
for_each_available_child_of_node(search, child) {
name = of_get_property(child, "regulator-compatible", NULL);
- if (!name)
- name = child->name;
+ if (!name) {
+ if (!desc->of_match_full_name)
+ name = child->name;
+ else
+ name = child->full_name;
+ }
if (!strcmp(desc->of_match, name)) {
of_node_put(search);