summaryrefslogtreecommitdiffstats
path: root/drivers/regulator/anatop-regulator.c
diff options
context:
space:
mode:
authorAxel Lin <axel.lin@gmail.com>2012-04-10 22:45:01 +0800
committerMark Brown <broonie@opensource.wolfsonmicro.com>2012-04-10 17:28:53 +0100
commitd914d81b74fd4e91aed334c3f664be4b94364ee8 (patch)
tree306c8a4da679fd3b2e69c6f6ad967596648e537c /drivers/regulator/anatop-regulator.c
parent0cb2f1239dd7acf72fb60adb53c1fdaa65b719a2 (diff)
downloadop-kernel-dev-d914d81b74fd4e91aed334c3f664be4b94364ee8.zip
op-kernel-dev-d914d81b74fd4e91aed334c3f664be4b94364ee8.tar.gz
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 53969af..8675c91 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)
struct anatop_regulator *sreg;
struct regulator_init_data *initdata;
struct anatop *anatopmfd = dev_get_drvdata(pdev->dev.parent);
+ struct regulator_config config = { };
int ret = 0;
initdata = of_get_regulator_init_data(dev, np);
@@ -178,9 +179,13 @@ static int __devinit anatop_regulator_probe(struct platform_device *pdev)
rdesc->n_voltages = (sreg->max_voltage - sreg->min_voltage)
/ 25000 + 1;
+ config.dev = &pdev->dev;
+ config.init_data = initdata;
+ config.driver_data = sreg;
+ config.of_node = pdev->dev.of_node;
+
/* register regulator */
- rdev = regulator_register(rdesc, dev,
- initdata, sreg, pdev->dev.of_node);
+ rdev = regulator_register(rdesc, &config);
if (IS_ERR(rdev)) {
dev_err(dev, "failed to register %s\n",
rdesc->name);
OpenPOWER on IntegriCloud