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.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/drivers/regulator/of_regulator.c b/drivers/regulator/of_regulator.c
index 91eaaf010524..24e812c48d93 100644
--- a/drivers/regulator/of_regulator.c
+++ b/drivers/regulator/of_regulator.c
@@ -270,6 +270,7 @@ EXPORT_SYMBOL_GPL(of_regulator_match);
270 270
271struct regulator_init_data *regulator_of_get_init_data(struct device *dev, 271struct regulator_init_data *regulator_of_get_init_data(struct device *dev,
272 const struct regulator_desc *desc, 272 const struct regulator_desc *desc,
273 struct regulator_config *config,
273 struct device_node **node) 274 struct device_node **node)
274{ 275{
275 struct device_node *search, *child; 276 struct device_node *search, *child;
@@ -307,6 +308,16 @@ struct regulator_init_data *regulator_of_get_init_data(struct device *dev,
307 break; 308 break;
308 } 309 }
309 310
311 if (desc->of_parse_cb) {
312 if (desc->of_parse_cb(child, desc, config)) {
313 dev_err(dev,
314 "driver callback failed to parse DT for regulator %s\n",
315 child->name);
316 init_data = NULL;
317 break;
318 }
319 }
320
310 of_node_get(child); 321 of_node_get(child);
311 *node = child; 322 *node = child;
312 break; 323 break;