diff --git a/drivers/regulator/of_regulator.c b/drivers/regulator/of_regulator.c index 3687a1c38c1c2af84994ace1381169c5e8c05319..64c09a37ac7f1ff56637349d7ba4e5bcea666f42 100644 --- a/drivers/regulator/of_regulator.c +++ b/drivers/regulator/of_regulator.c @@ -221,7 +221,8 @@ int of_regulator_match(struct device *dev, struct device_node *node, continue; match->init_data = - of_get_regulator_init_data(dev, child, NULL); + of_get_regulator_init_data(dev, child, + match->desc); if (!match->init_data) { dev_err(dev, "failed to parse DT for regulator %s\n", diff --git a/include/linux/regulator/of_regulator.h b/include/linux/regulator/of_regulator.h index 8d1d136c0fb9cd35fbb73e063dae696c2e39cd41..763953f7e3b8a4f65c7cb8fdd4fdf4ecdc4722e0 100644 --- a/include/linux/regulator/of_regulator.h +++ b/include/linux/regulator/of_regulator.h @@ -13,6 +13,7 @@ struct of_regulator_match { void *driver_data; struct regulator_init_data *init_data; struct device_node *of_node; + const struct regulator_desc *desc; }; #if defined(CONFIG_OF)