aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/regulator/anatop-regulator.c
diff options
context:
space:
mode:
authorAxel Lin <axel.lin@gmail.com>2012-04-10 10:45:01 -0400
committerMark Brown <broonie@opensource.wolfsonmicro.com>2012-04-10 12:28:53 -0400
commitd914d81b74fd4e91aed334c3f664be4b94364ee8 (patch)
tree306c8a4da679fd3b2e69c6f6ad967596648e537c /drivers/regulator/anatop-regulator.c
parent0cb2f1239dd7acf72fb60adb53c1fdaa65b719a2 (diff)
regulator: Convert anatop to use a struct to pass in regulator runtime configuration
Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Diffstat (limited to 'drivers/regulator/anatop-regulator.c')
-rw-r--r--drivers/regulator/anatop-regulator.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/drivers/regulator/anatop-regulator.c b/drivers/regulator/anatop-regulator.c
index 53969af17558..8675c91ed21a 100644
--- a/drivers/regulator/anatop-regulator.c
+++ b/drivers/regulator/anatop-regulator.c
@@ -122,6 +122,7 @@ static int __devinit anatop_regulator_probe(struct platform_device *pdev)
122 struct anatop_regulator *sreg; 122 struct anatop_regulator *sreg;
123 struct regulator_init_data *initdata; 123 struct regulator_init_data *initdata;
124 struct anatop *anatopmfd = dev_get_drvdata(pdev->dev.parent); 124 struct anatop *anatopmfd = dev_get_drvdata(pdev->dev.parent);
125 struct regulator_config config = { };
125 int ret = 0; 126 int ret = 0;
126 127
127 initdata = of_get_regulator_init_data(dev, np); 128 initdata = of_get_regulator_init_data(dev, np);
@@ -178,9 +179,13 @@ static int __devinit anatop_regulator_probe(struct platform_device *pdev)
178 rdesc->n_voltages = (sreg->max_voltage - sreg->min_voltage) 179 rdesc->n_voltages = (sreg->max_voltage - sreg->min_voltage)
179 / 25000 + 1; 180 / 25000 + 1;
180 181
182 config.dev = &pdev->dev;
183 config.init_data = initdata;
184 config.driver_data = sreg;
185 config.of_node = pdev->dev.of_node;
186
181 /* register regulator */ 187 /* register regulator */
182 rdev = regulator_register(rdesc, dev, 188 rdev = regulator_register(rdesc, &config);
183 initdata, sreg, pdev->dev.of_node);
184 if (IS_ERR(rdev)) { 189 if (IS_ERR(rdev)) {
185 dev_err(dev, "failed to register %s\n", 190 dev_err(dev, "failed to register %s\n",
186 rdesc->name); 191 rdesc->name);