Commit 076c3b8e authored by James Ban's avatar James Ban Committed by Mark Brown

regulator: da9211: fix unmatched of_node

This is a patch for fixing unmatched of_node.
Signed-off-by: default avatarJames Ban <james.ban.opensource@diasemi.com>
Signed-off-by: default avatarMark Brown <broonie@kernel.org>
parent 97bf6af1
...@@ -276,7 +276,7 @@ static struct da9211_pdata *da9211_parse_regulators_dt( ...@@ -276,7 +276,7 @@ static struct da9211_pdata *da9211_parse_regulators_dt(
continue; continue;
pdata->init_data[n] = da9211_matches[i].init_data; pdata->init_data[n] = da9211_matches[i].init_data;
pdata->reg_node[n] = da9211_matches[i].of_node;
n++; n++;
} }
...@@ -364,7 +364,7 @@ static int da9211_regulator_init(struct da9211 *chip) ...@@ -364,7 +364,7 @@ static int da9211_regulator_init(struct da9211 *chip)
config.dev = chip->dev; config.dev = chip->dev;
config.driver_data = chip; config.driver_data = chip;
config.regmap = chip->regmap; config.regmap = chip->regmap;
config.of_node = chip->dev->of_node; config.of_node = chip->pdata->reg_node[i];
chip->rdev[i] = devm_regulator_register(chip->dev, chip->rdev[i] = devm_regulator_register(chip->dev,
&da9211_regulators[i], &config); &da9211_regulators[i], &config);
......
...@@ -32,6 +32,7 @@ struct da9211_pdata { ...@@ -32,6 +32,7 @@ struct da9211_pdata {
* 2 : 2 phase 2 buck * 2 : 2 phase 2 buck
*/ */
int num_buck; int num_buck;
struct device_node *reg_node[DA9211_MAX_REGULATORS];
struct regulator_init_data *init_data[DA9211_MAX_REGULATORS]; struct regulator_init_data *init_data[DA9211_MAX_REGULATORS];
}; };
#endif #endif
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment