Skip to content

Commit

Permalink
regulator: da9211: fix unmatched of_node
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
James Ban authored and Mark Brown committed Jan 16, 2015
1 parent 97bf6af commit 076c3b8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/regulator/da9211-regulator.c
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,7 @@ static struct da9211_pdata *da9211_parse_regulators_dt(
continue;

pdata->init_data[n] = da9211_matches[i].init_data;

pdata->reg_node[n] = da9211_matches[i].of_node;
n++;
}

Expand Down Expand Up @@ -364,7 +364,7 @@ static int da9211_regulator_init(struct da9211 *chip)
config.dev = chip->dev;
config.driver_data = chip;
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,
&da9211_regulators[i], &config);
Expand Down
1 change: 1 addition & 0 deletions include/linux/regulator/da9211.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ struct da9211_pdata {
* 2 : 2 phase 2 buck
*/
int num_buck;
struct device_node *reg_node[DA9211_MAX_REGULATORS];
struct regulator_init_data *init_data[DA9211_MAX_REGULATORS];
};
#endif

0 comments on commit 076c3b8

Please sign in to comment.