diff options
author | James Ban <james.ban.opensource@diasemi.com> | 2015-01-15 22:13:27 -0500 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2015-01-16 06:47:59 -0500 |
commit | 076c3b8e03e2737659a89660bb8e54e13587d974 (patch) | |
tree | 36467ff5a8bd0ef4a4a381e7e4f43d2912ef9c6f | |
parent | 97bf6af1f928216fd6c5a66e8a57bfa95a659672 (diff) |
regulator: da9211: fix unmatched of_node
This is a patch for fixing unmatched of_node.
Signed-off-by: James Ban <james.ban.opensource@diasemi.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
-rw-r--r-- | drivers/regulator/da9211-regulator.c | 4 | ||||
-rw-r--r-- | include/linux/regulator/da9211.h | 1 |
2 files changed, 3 insertions, 2 deletions
diff --git a/drivers/regulator/da9211-regulator.c b/drivers/regulator/da9211-regulator.c index c78d2106d6cb..8e6957c63a69 100644 --- a/drivers/regulator/da9211-regulator.c +++ b/drivers/regulator/da9211-regulator.c | |||
@@ -276,7 +276,7 @@ static struct da9211_pdata *da9211_parse_regulators_dt( | |||
276 | continue; | 276 | continue; |
277 | 277 | ||
278 | pdata->init_data[n] = da9211_matches[i].init_data; | 278 | pdata->init_data[n] = da9211_matches[i].init_data; |
279 | 279 | pdata->reg_node[n] = da9211_matches[i].of_node; | |
280 | n++; | 280 | n++; |
281 | } | 281 | } |
282 | 282 | ||
@@ -364,7 +364,7 @@ static int da9211_regulator_init(struct da9211 *chip) | |||
364 | config.dev = chip->dev; | 364 | config.dev = chip->dev; |
365 | config.driver_data = chip; | 365 | config.driver_data = chip; |
366 | config.regmap = chip->regmap; | 366 | config.regmap = chip->regmap; |
367 | config.of_node = chip->dev->of_node; | 367 | config.of_node = chip->pdata->reg_node[i]; |
368 | 368 | ||
369 | chip->rdev[i] = devm_regulator_register(chip->dev, | 369 | chip->rdev[i] = devm_regulator_register(chip->dev, |
370 | &da9211_regulators[i], &config); | 370 | &da9211_regulators[i], &config); |
diff --git a/include/linux/regulator/da9211.h b/include/linux/regulator/da9211.h index 5479394fefce..d1d9d3849bdb 100644 --- a/include/linux/regulator/da9211.h +++ b/include/linux/regulator/da9211.h | |||
@@ -32,6 +32,7 @@ struct da9211_pdata { | |||
32 | * 2 : 2 phase 2 buck | 32 | * 2 : 2 phase 2 buck |
33 | */ | 33 | */ |
34 | int num_buck; | 34 | int num_buck; |
35 | struct device_node *reg_node[DA9211_MAX_REGULATORS]; | ||
35 | struct regulator_init_data *init_data[DA9211_MAX_REGULATORS]; | 36 | struct regulator_init_data *init_data[DA9211_MAX_REGULATORS]; |
36 | }; | 37 | }; |
37 | #endif | 38 | #endif |