regulator: da9211: fix unmatched of_node
authorJames Ban <james.ban.opensource@diasemi.com>
Fri, 16 Jan 2015 03:13:27 +0000 (12:13 +0900)
committerMark Brown <broonie@kernel.org>
Fri, 16 Jan 2015 11:47:59 +0000 (11:47 +0000)
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>
drivers/regulator/da9211-regulator.c
include/linux/regulator/da9211.h

index c78d2106d6cb66aa6b5ca1b8df25c244c73a3686..8e6957c63a694a464710fa70b11849496684b009 100644 (file)
@@ -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++;
        }
 
@@ -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);
index 5479394fefcec75bce9a090093d9d5d6e81e5b5d..d1d9d3849bdbfa01db8b0ab9cfbbe6c671616b7d 100644 (file)
@@ -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
This page took 0.029799 seconds and 5 git commands to generate.