aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/regulator/88pm8607.c2
-rw-r--r--drivers/regulator/aat2870-regulator.c2
-rw-r--r--drivers/regulator/ab3100.c2
-rw-r--r--drivers/regulator/ab8500.c2
-rw-r--r--drivers/regulator/ad5398.c2
-rw-r--r--drivers/regulator/bq24022.c2
-rw-r--r--drivers/regulator/core.c3
-rw-r--r--drivers/regulator/da903x.c2
-rw-r--r--drivers/regulator/db8500-prcmu.c2
-rw-r--r--drivers/regulator/dummy.c2
-rw-r--r--drivers/regulator/fixed.c2
-rw-r--r--drivers/regulator/isl6271a-regulator.c2
-rw-r--r--drivers/regulator/lp3971.c2
-rw-r--r--drivers/regulator/lp3972.c2
-rw-r--r--drivers/regulator/max1586.c2
-rw-r--r--drivers/regulator/max8649.c2
-rw-r--r--drivers/regulator/max8660.c2
-rw-r--r--drivers/regulator/max8925-regulator.c2
-rw-r--r--drivers/regulator/max8952.c2
-rw-r--r--drivers/regulator/max8997.c2
-rw-r--r--drivers/regulator/max8998.c2
-rw-r--r--drivers/regulator/mc13783-regulator.c2
-rw-r--r--drivers/regulator/mc13892-regulator.c2
-rw-r--r--drivers/regulator/pcap-regulator.c2
-rw-r--r--drivers/regulator/pcf50633-regulator.c2
-rw-r--r--drivers/regulator/tps6105x-regulator.c3
-rw-r--r--drivers/regulator/tps65023-regulator.c2
-rw-r--r--drivers/regulator/tps6507x-regulator.c2
-rw-r--r--drivers/regulator/tps6524x-regulator.c2
-rw-r--r--drivers/regulator/tps6586x-regulator.c2
-rw-r--r--drivers/regulator/tps65910-regulator.c2
-rw-r--r--drivers/regulator/tps65912-regulator.c2
-rw-r--r--drivers/regulator/twl-regulator.c2
-rw-r--r--drivers/regulator/wm831x-dcdc.c8
-rw-r--r--drivers/regulator/wm831x-isink.c2
-rw-r--r--drivers/regulator/wm831x-ldo.c6
-rw-r--r--drivers/regulator/wm8350-regulator.c2
-rw-r--r--drivers/regulator/wm8400-regulator.c2
-rw-r--r--drivers/regulator/wm8994-regulator.c2
-rw-r--r--include/linux/regulator/driver.h2
-rw-r--r--sound/soc/codecs/sgtl5000.c2
41 files changed, 48 insertions, 46 deletions
diff --git a/drivers/regulator/88pm8607.c b/drivers/regulator/88pm8607.c
index ca0d608f8248..df33530cec4a 100644
--- a/drivers/regulator/88pm8607.c
+++ b/drivers/regulator/88pm8607.c
@@ -427,7 +427,7 @@ static int __devinit pm8607_regulator_probe(struct platform_device *pdev)
427 427
428 /* replace driver_data with info */ 428 /* replace driver_data with info */
429 info->regulator = regulator_register(&info->desc, &pdev->dev, 429 info->regulator = regulator_register(&info->desc, &pdev->dev,
430 pdata, info); 430 pdata, info, NULL);
431 if (IS_ERR(info->regulator)) { 431 if (IS_ERR(info->regulator)) {
432 dev_err(&pdev->dev, "failed to register regulator %s\n", 432 dev_err(&pdev->dev, "failed to register regulator %s\n",
433 info->desc.name); 433 info->desc.name);
diff --git a/drivers/regulator/aat2870-regulator.c b/drivers/regulator/aat2870-regulator.c
index 5abeb3ac3e8d..07e98ec6a324 100644
--- a/drivers/regulator/aat2870-regulator.c
+++ b/drivers/regulator/aat2870-regulator.c
@@ -188,7 +188,7 @@ static int aat2870_regulator_probe(struct platform_device *pdev)
188 ri->pdev = pdev; 188 ri->pdev = pdev;
189 189
190 rdev = regulator_register(&ri->desc, &pdev->dev, 190 rdev = regulator_register(&ri->desc, &pdev->dev,
191 pdev->dev.platform_data, ri); 191 pdev->dev.platform_data, ri, NULL);
192 if (IS_ERR(rdev)) { 192 if (IS_ERR(rdev)) {
193 dev_err(&pdev->dev, "Failed to register regulator %s\n", 193 dev_err(&pdev->dev, "Failed to register regulator %s\n",
194 ri->desc.name); 194 ri->desc.name);
diff --git a/drivers/regulator/ab3100.c b/drivers/regulator/ab3100.c
index 585e4946fe0a..042271aace6a 100644
--- a/drivers/regulator/ab3100.c
+++ b/drivers/regulator/ab3100.c
@@ -634,7 +634,7 @@ static int __devinit ab3100_regulators_probe(struct platform_device *pdev)
634 rdev = regulator_register(&ab3100_regulator_desc[i], 634 rdev = regulator_register(&ab3100_regulator_desc[i],
635 &pdev->dev, 635 &pdev->dev,
636 &plfdata->reg_constraints[i], 636 &plfdata->reg_constraints[i],
637 reg); 637 reg, NULL);
638 638
639 if (IS_ERR(rdev)) { 639 if (IS_ERR(rdev)) {
640 err = PTR_ERR(rdev); 640 err = PTR_ERR(rdev);
diff --git a/drivers/regulator/ab8500.c b/drivers/regulator/ab8500.c
index 6e1ae69646b3..e91b8ddc2793 100644
--- a/drivers/regulator/ab8500.c
+++ b/drivers/regulator/ab8500.c
@@ -822,7 +822,7 @@ static __devinit int ab8500_regulator_probe(struct platform_device *pdev)
822 822
823 /* register regulator with framework */ 823 /* register regulator with framework */
824 info->regulator = regulator_register(&info->desc, &pdev->dev, 824 info->regulator = regulator_register(&info->desc, &pdev->dev,
825 &pdata->regulator[i], info); 825 &pdata->regulator[i], info, NULL);
826 if (IS_ERR(info->regulator)) { 826 if (IS_ERR(info->regulator)) {
827 err = PTR_ERR(info->regulator); 827 err = PTR_ERR(info->regulator);
828 dev_err(&pdev->dev, "failed to register regulator %s\n", 828 dev_err(&pdev->dev, "failed to register regulator %s\n",
diff --git a/drivers/regulator/ad5398.c b/drivers/regulator/ad5398.c
index a4be41614eeb..483c80930852 100644
--- a/drivers/regulator/ad5398.c
+++ b/drivers/regulator/ad5398.c
@@ -233,7 +233,7 @@ static int __devinit ad5398_probe(struct i2c_client *client,
233 chip->current_mask = (chip->current_level - 1) << chip->current_offset; 233 chip->current_mask = (chip->current_level - 1) << chip->current_offset;
234 234
235 chip->rdev = regulator_register(&ad5398_reg, &client->dev, 235 chip->rdev = regulator_register(&ad5398_reg, &client->dev,
236 init_data, chip); 236 init_data, chip, NULL);
237 if (IS_ERR(chip->rdev)) { 237 if (IS_ERR(chip->rdev)) {
238 ret = PTR_ERR(chip->rdev); 238 ret = PTR_ERR(chip->rdev);
239 dev_err(&client->dev, "failed to register %s %s\n", 239 dev_err(&client->dev, "failed to register %s %s\n",
diff --git a/drivers/regulator/bq24022.c b/drivers/regulator/bq24022.c
index e24d1b7d97a8..9fab6d1bbe80 100644
--- a/drivers/regulator/bq24022.c
+++ b/drivers/regulator/bq24022.c
@@ -107,7 +107,7 @@ static int __init bq24022_probe(struct platform_device *pdev)
107 ret = gpio_direction_output(pdata->gpio_nce, 1); 107 ret = gpio_direction_output(pdata->gpio_nce, 1);
108 108
109 bq24022 = regulator_register(&bq24022_desc, &pdev->dev, 109 bq24022 = regulator_register(&bq24022_desc, &pdev->dev,
110 pdata->init_data, pdata); 110 pdata->init_data, pdata, NULL);
111 if (IS_ERR(bq24022)) { 111 if (IS_ERR(bq24022)) {
112 dev_dbg(&pdev->dev, "couldn't register regulator\n"); 112 dev_dbg(&pdev->dev, "couldn't register regulator\n");
113 ret = PTR_ERR(bq24022); 113 ret = PTR_ERR(bq24022);
diff --git a/drivers/regulator/core.c b/drivers/regulator/core.c
index 669d02160221..8b01eb06ba64 100644
--- a/drivers/regulator/core.c
+++ b/drivers/regulator/core.c
@@ -2637,7 +2637,7 @@ static void rdev_init_debugfs(struct regulator_dev *rdev)
2637 */ 2637 */
2638struct regulator_dev *regulator_register(struct regulator_desc *regulator_desc, 2638struct regulator_dev *regulator_register(struct regulator_desc *regulator_desc,
2639 struct device *dev, const struct regulator_init_data *init_data, 2639 struct device *dev, const struct regulator_init_data *init_data,
2640 void *driver_data) 2640 void *driver_data, struct device_node *of_node)
2641{ 2641{
2642 static atomic_t regulator_no = ATOMIC_INIT(0); 2642 static atomic_t regulator_no = ATOMIC_INIT(0);
2643 struct regulator_dev *rdev; 2643 struct regulator_dev *rdev;
@@ -2696,6 +2696,7 @@ struct regulator_dev *regulator_register(struct regulator_desc *regulator_desc,
2696 2696
2697 /* register with sysfs */ 2697 /* register with sysfs */
2698 rdev->dev.class = &regulator_class; 2698 rdev->dev.class = &regulator_class;
2699 rdev->dev.of_node = of_node;
2699 rdev->dev.parent = dev; 2700 rdev->dev.parent = dev;
2700 dev_set_name(&rdev->dev, "regulator.%d", 2701 dev_set_name(&rdev->dev, "regulator.%d",
2701 atomic_inc_return(&regulator_no) - 1); 2702 atomic_inc_return(&regulator_no) - 1);
diff --git a/drivers/regulator/da903x.c b/drivers/regulator/da903x.c
index e23ddfa8b2c6..8dbc54da7d70 100644
--- a/drivers/regulator/da903x.c
+++ b/drivers/regulator/da903x.c
@@ -537,7 +537,7 @@ static int __devinit da903x_regulator_probe(struct platform_device *pdev)
537 ri->desc.ops = &da9030_regulator_ldo1_15_ops; 537 ri->desc.ops = &da9030_regulator_ldo1_15_ops;
538 538
539 rdev = regulator_register(&ri->desc, &pdev->dev, 539 rdev = regulator_register(&ri->desc, &pdev->dev,
540 pdev->dev.platform_data, ri); 540 pdev->dev.platform_data, ri, NULL);
541 if (IS_ERR(rdev)) { 541 if (IS_ERR(rdev)) {
542 dev_err(&pdev->dev, "failed to register regulator %s\n", 542 dev_err(&pdev->dev, "failed to register regulator %s\n",
543 ri->desc.name); 543 ri->desc.name);
diff --git a/drivers/regulator/db8500-prcmu.c b/drivers/regulator/db8500-prcmu.c
index 78329751af54..515443fcd26b 100644
--- a/drivers/regulator/db8500-prcmu.c
+++ b/drivers/regulator/db8500-prcmu.c
@@ -486,7 +486,7 @@ static int __devinit db8500_regulator_probe(struct platform_device *pdev)
486 486
487 /* register with the regulator framework */ 487 /* register with the regulator framework */
488 info->rdev = regulator_register(&info->desc, &pdev->dev, 488 info->rdev = regulator_register(&info->desc, &pdev->dev,
489 init_data, info); 489 init_data, info, NULL);
490 if (IS_ERR(info->rdev)) { 490 if (IS_ERR(info->rdev)) {
491 err = PTR_ERR(info->rdev); 491 err = PTR_ERR(info->rdev);
492 dev_err(&pdev->dev, "failed to register %s: err %i\n", 492 dev_err(&pdev->dev, "failed to register %s: err %i\n",
diff --git a/drivers/regulator/dummy.c b/drivers/regulator/dummy.c
index b8f520513ce7..0ee00de4be72 100644
--- a/drivers/regulator/dummy.c
+++ b/drivers/regulator/dummy.c
@@ -42,7 +42,7 @@ static int __devinit dummy_regulator_probe(struct platform_device *pdev)
42 int ret; 42 int ret;
43 43
44 dummy_regulator_rdev = regulator_register(&dummy_desc, NULL, 44 dummy_regulator_rdev = regulator_register(&dummy_desc, NULL,
45 &dummy_initdata, NULL); 45 &dummy_initdata, NULL, NULL);
46 if (IS_ERR(dummy_regulator_rdev)) { 46 if (IS_ERR(dummy_regulator_rdev)) {
47 ret = PTR_ERR(dummy_regulator_rdev); 47 ret = PTR_ERR(dummy_regulator_rdev);
48 pr_err("Failed to register regulator: %d\n", ret); 48 pr_err("Failed to register regulator: %d\n", ret);
diff --git a/drivers/regulator/fixed.c b/drivers/regulator/fixed.c
index 0650856b93cb..db90919f99c2 100644
--- a/drivers/regulator/fixed.c
+++ b/drivers/regulator/fixed.c
@@ -234,7 +234,7 @@ static int __devinit reg_fixed_voltage_probe(struct platform_device *pdev)
234 } 234 }
235 235
236 drvdata->dev = regulator_register(&drvdata->desc, &pdev->dev, 236 drvdata->dev = regulator_register(&drvdata->desc, &pdev->dev,
237 config->init_data, drvdata); 237 config->init_data, drvdata, NULL);
238 if (IS_ERR(drvdata->dev)) { 238 if (IS_ERR(drvdata->dev)) {
239 ret = PTR_ERR(drvdata->dev); 239 ret = PTR_ERR(drvdata->dev);
240 dev_err(&pdev->dev, "Failed to register regulator: %d\n", ret); 240 dev_err(&pdev->dev, "Failed to register regulator: %d\n", ret);
diff --git a/drivers/regulator/isl6271a-regulator.c b/drivers/regulator/isl6271a-regulator.c
index e4b3592e8176..c1a456c4257c 100644
--- a/drivers/regulator/isl6271a-regulator.c
+++ b/drivers/regulator/isl6271a-regulator.c
@@ -170,7 +170,7 @@ static int __devinit isl6271a_probe(struct i2c_client *i2c,
170 170
171 for (i = 0; i < 3; i++) { 171 for (i = 0; i < 3; i++) {
172 pmic->rdev[i] = regulator_register(&isl_rd[i], &i2c->dev, 172 pmic->rdev[i] = regulator_register(&isl_rd[i], &i2c->dev,
173 init_data, pmic); 173 init_data, pmic, NULL);
174 if (IS_ERR(pmic->rdev[i])) { 174 if (IS_ERR(pmic->rdev[i])) {
175 dev_err(&i2c->dev, "failed to register %s\n", id->name); 175 dev_err(&i2c->dev, "failed to register %s\n", id->name);
176 err = PTR_ERR(pmic->rdev[i]); 176 err = PTR_ERR(pmic->rdev[i]);
diff --git a/drivers/regulator/lp3971.c b/drivers/regulator/lp3971.c
index 72b16b5f3db6..0cfabd318a59 100644
--- a/drivers/regulator/lp3971.c
+++ b/drivers/regulator/lp3971.c
@@ -451,7 +451,7 @@ static int __devinit setup_regulators(struct lp3971 *lp3971,
451 for (i = 0; i < pdata->num_regulators; i++) { 451 for (i = 0; i < pdata->num_regulators; i++) {
452 struct lp3971_regulator_subdev *reg = &pdata->regulators[i]; 452 struct lp3971_regulator_subdev *reg = &pdata->regulators[i];
453 lp3971->rdev[i] = regulator_register(&regulators[reg->id], 453 lp3971->rdev[i] = regulator_register(&regulators[reg->id],
454 lp3971->dev, reg->initdata, lp3971); 454 lp3971->dev, reg->initdata, lp3971, NULL);
455 455
456 if (IS_ERR(lp3971->rdev[i])) { 456 if (IS_ERR(lp3971->rdev[i])) {
457 err = PTR_ERR(lp3971->rdev[i]); 457 err = PTR_ERR(lp3971->rdev[i]);
diff --git a/drivers/regulator/lp3972.c b/drivers/regulator/lp3972.c
index fbc5e3741bef..49a15eefe5fe 100644
--- a/drivers/regulator/lp3972.c
+++ b/drivers/regulator/lp3972.c
@@ -555,7 +555,7 @@ static int __devinit setup_regulators(struct lp3972 *lp3972,
555 for (i = 0; i < pdata->num_regulators; i++) { 555 for (i = 0; i < pdata->num_regulators; i++) {
556 struct lp3972_regulator_subdev *reg = &pdata->regulators[i]; 556 struct lp3972_regulator_subdev *reg = &pdata->regulators[i];
557 lp3972->rdev[i] = regulator_register(&regulators[reg->id], 557 lp3972->rdev[i] = regulator_register(&regulators[reg->id],
558 lp3972->dev, reg->initdata, lp3972); 558 lp3972->dev, reg->initdata, lp3972, NULL);
559 559
560 if (IS_ERR(lp3972->rdev[i])) { 560 if (IS_ERR(lp3972->rdev[i])) {
561 err = PTR_ERR(lp3972->rdev[i]); 561 err = PTR_ERR(lp3972->rdev[i]);
diff --git a/drivers/regulator/max1586.c b/drivers/regulator/max1586.c
index 3f49512c5134..40e7a4db2853 100644
--- a/drivers/regulator/max1586.c
+++ b/drivers/regulator/max1586.c
@@ -214,7 +214,7 @@ static int __devinit max1586_pmic_probe(struct i2c_client *client,
214 } 214 }
215 rdev[i] = regulator_register(&max1586_reg[id], &client->dev, 215 rdev[i] = regulator_register(&max1586_reg[id], &client->dev,
216 pdata->subdevs[i].platform_data, 216 pdata->subdevs[i].platform_data,
217 max1586); 217 max1586, NULL);
218 if (IS_ERR(rdev[i])) { 218 if (IS_ERR(rdev[i])) {
219 ret = PTR_ERR(rdev[i]); 219 ret = PTR_ERR(rdev[i]);
220 dev_err(&client->dev, "failed to register %s\n", 220 dev_err(&client->dev, "failed to register %s\n",
diff --git a/drivers/regulator/max8649.c b/drivers/regulator/max8649.c
index 1062cf9f02dc..524a5da23c75 100644
--- a/drivers/regulator/max8649.c
+++ b/drivers/regulator/max8649.c
@@ -347,7 +347,7 @@ static int __devinit max8649_regulator_probe(struct i2c_client *client,
347 } 347 }
348 348
349 info->regulator = regulator_register(&dcdc_desc, &client->dev, 349 info->regulator = regulator_register(&dcdc_desc, &client->dev,
350 pdata->regulator, info); 350 pdata->regulator, info, NULL);
351 if (IS_ERR(info->regulator)) { 351 if (IS_ERR(info->regulator)) {
352 dev_err(info->dev, "failed to register regulator %s\n", 352 dev_err(info->dev, "failed to register regulator %s\n",
353 dcdc_desc.name); 353 dcdc_desc.name);
diff --git a/drivers/regulator/max8660.c b/drivers/regulator/max8660.c
index 33f5d9a492ef..a838e664569f 100644
--- a/drivers/regulator/max8660.c
+++ b/drivers/regulator/max8660.c
@@ -449,7 +449,7 @@ static int __devinit max8660_probe(struct i2c_client *client,
449 449
450 rdev[i] = regulator_register(&max8660_reg[id], &client->dev, 450 rdev[i] = regulator_register(&max8660_reg[id], &client->dev,
451 pdata->subdevs[i].platform_data, 451 pdata->subdevs[i].platform_data,
452 max8660); 452 max8660, NULL);
453 if (IS_ERR(rdev[i])) { 453 if (IS_ERR(rdev[i])) {
454 ret = PTR_ERR(rdev[i]); 454 ret = PTR_ERR(rdev[i]);
455 dev_err(&client->dev, "failed to register %s\n", 455 dev_err(&client->dev, "failed to register %s\n",
diff --git a/drivers/regulator/max8925-regulator.c b/drivers/regulator/max8925-regulator.c
index cc9ec0e03271..f976e5d0867e 100644
--- a/drivers/regulator/max8925-regulator.c
+++ b/drivers/regulator/max8925-regulator.c
@@ -266,7 +266,7 @@ static int __devinit max8925_regulator_probe(struct platform_device *pdev)
266 ri->chip = chip; 266 ri->chip = chip;
267 267
268 rdev = regulator_register(&ri->desc, &pdev->dev, 268 rdev = regulator_register(&ri->desc, &pdev->dev,
269 pdata->regulator[pdev->id], ri); 269 pdata->regulator[pdev->id], ri, NULL);
270 if (IS_ERR(rdev)) { 270 if (IS_ERR(rdev)) {
271 dev_err(&pdev->dev, "failed to register regulator %s\n", 271 dev_err(&pdev->dev, "failed to register regulator %s\n",
272 ri->desc.name); 272 ri->desc.name);
diff --git a/drivers/regulator/max8952.c b/drivers/regulator/max8952.c
index 3883d85c5b88..75d89400c123 100644
--- a/drivers/regulator/max8952.c
+++ b/drivers/regulator/max8952.c
@@ -208,7 +208,7 @@ static int __devinit max8952_pmic_probe(struct i2c_client *client,
208 max8952->pdata = pdata; 208 max8952->pdata = pdata;
209 209
210 max8952->rdev = regulator_register(&regulator, max8952->dev, 210 max8952->rdev = regulator_register(&regulator, max8952->dev,
211 &pdata->reg_data, max8952); 211 &pdata->reg_data, max8952, NULL);
212 212
213 if (IS_ERR(max8952->rdev)) { 213 if (IS_ERR(max8952->rdev)) {
214 ret = PTR_ERR(max8952->rdev); 214 ret = PTR_ERR(max8952->rdev);
diff --git a/drivers/regulator/max8997.c b/drivers/regulator/max8997.c
index 6176129a27e5..d26e8646277b 100644
--- a/drivers/regulator/max8997.c
+++ b/drivers/regulator/max8997.c
@@ -1146,7 +1146,7 @@ static __devinit int max8997_pmic_probe(struct platform_device *pdev)
1146 regulators[id].n_voltages = 16; 1146 regulators[id].n_voltages = 16;
1147 1147
1148 rdev[i] = regulator_register(&regulators[id], max8997->dev, 1148 rdev[i] = regulator_register(&regulators[id], max8997->dev,
1149 pdata->regulators[i].initdata, max8997); 1149 pdata->regulators[i].initdata, max8997, NULL);
1150 if (IS_ERR(rdev[i])) { 1150 if (IS_ERR(rdev[i])) {
1151 ret = PTR_ERR(rdev[i]); 1151 ret = PTR_ERR(rdev[i]);
1152 dev_err(max8997->dev, "regulator init failed for %d\n", 1152 dev_err(max8997->dev, "regulator init failed for %d\n",
diff --git a/drivers/regulator/max8998.c b/drivers/regulator/max8998.c
index 41a1495eec2b..2d38c2493a07 100644
--- a/drivers/regulator/max8998.c
+++ b/drivers/regulator/max8998.c
@@ -847,7 +847,7 @@ static __devinit int max8998_pmic_probe(struct platform_device *pdev)
847 regulators[index].n_voltages = count; 847 regulators[index].n_voltages = count;
848 } 848 }
849 rdev[i] = regulator_register(&regulators[index], max8998->dev, 849 rdev[i] = regulator_register(&regulators[index], max8998->dev,
850 pdata->regulators[i].initdata, max8998); 850 pdata->regulators[i].initdata, max8998, NULL);
851 if (IS_ERR(rdev[i])) { 851 if (IS_ERR(rdev[i])) {
852 ret = PTR_ERR(rdev[i]); 852 ret = PTR_ERR(rdev[i]);
853 dev_err(max8998->dev, "regulator init failed\n"); 853 dev_err(max8998->dev, "regulator init failed\n");
diff --git a/drivers/regulator/mc13783-regulator.c b/drivers/regulator/mc13783-regulator.c
index 8479082e1aea..56d4a677c404 100644
--- a/drivers/regulator/mc13783-regulator.c
+++ b/drivers/regulator/mc13783-regulator.c
@@ -357,7 +357,7 @@ static int __devinit mc13783_regulator_probe(struct platform_device *pdev)
357 init_data = &pdata->regulators[i]; 357 init_data = &pdata->regulators[i];
358 priv->regulators[i] = regulator_register( 358 priv->regulators[i] = regulator_register(
359 &mc13783_regulators[init_data->id].desc, 359 &mc13783_regulators[init_data->id].desc,
360 &pdev->dev, init_data->init_data, priv); 360 &pdev->dev, init_data->init_data, priv, NULL);
361 361
362 if (IS_ERR(priv->regulators[i])) { 362 if (IS_ERR(priv->regulators[i])) {
363 dev_err(&pdev->dev, "failed to register regulator %s\n", 363 dev_err(&pdev->dev, "failed to register regulator %s\n",
diff --git a/drivers/regulator/mc13892-regulator.c b/drivers/regulator/mc13892-regulator.c
index 023d17d022cf..2824804a2892 100644
--- a/drivers/regulator/mc13892-regulator.c
+++ b/drivers/regulator/mc13892-regulator.c
@@ -573,7 +573,7 @@ static int __devinit mc13892_regulator_probe(struct platform_device *pdev)
573 init_data = &pdata->regulators[i]; 573 init_data = &pdata->regulators[i];
574 priv->regulators[i] = regulator_register( 574 priv->regulators[i] = regulator_register(
575 &mc13892_regulators[init_data->id].desc, 575 &mc13892_regulators[init_data->id].desc,
576 &pdev->dev, init_data->init_data, priv); 576 &pdev->dev, init_data->init_data, priv, NULL);
577 577
578 if (IS_ERR(priv->regulators[i])) { 578 if (IS_ERR(priv->regulators[i])) {
579 dev_err(&pdev->dev, "failed to register regulator %s\n", 579 dev_err(&pdev->dev, "failed to register regulator %s\n",
diff --git a/drivers/regulator/pcap-regulator.c b/drivers/regulator/pcap-regulator.c
index 31f6e11a7f16..a5aab1b08bcf 100644
--- a/drivers/regulator/pcap-regulator.c
+++ b/drivers/regulator/pcap-regulator.c
@@ -277,7 +277,7 @@ static int __devinit pcap_regulator_probe(struct platform_device *pdev)
277 void *pcap = dev_get_drvdata(pdev->dev.parent); 277 void *pcap = dev_get_drvdata(pdev->dev.parent);
278 278
279 rdev = regulator_register(&pcap_regulators[pdev->id], &pdev->dev, 279 rdev = regulator_register(&pcap_regulators[pdev->id], &pdev->dev,
280 pdev->dev.platform_data, pcap); 280 pdev->dev.platform_data, pcap, NULL);
281 if (IS_ERR(rdev)) 281 if (IS_ERR(rdev))
282 return PTR_ERR(rdev); 282 return PTR_ERR(rdev);
283 283
diff --git a/drivers/regulator/pcf50633-regulator.c b/drivers/regulator/pcf50633-regulator.c
index 69a11d9dd87f..1d1c31056297 100644
--- a/drivers/regulator/pcf50633-regulator.c
+++ b/drivers/regulator/pcf50633-regulator.c
@@ -320,7 +320,7 @@ static int __devinit pcf50633_regulator_probe(struct platform_device *pdev)
320 pcf = dev_to_pcf50633(pdev->dev.parent); 320 pcf = dev_to_pcf50633(pdev->dev.parent);
321 321
322 rdev = regulator_register(&regulators[pdev->id], &pdev->dev, 322 rdev = regulator_register(&regulators[pdev->id], &pdev->dev,
323 pdev->dev.platform_data, pcf); 323 pdev->dev.platform_data, pcf, NULL);
324 if (IS_ERR(rdev)) 324 if (IS_ERR(rdev))
325 return PTR_ERR(rdev); 325 return PTR_ERR(rdev);
326 326
diff --git a/drivers/regulator/tps6105x-regulator.c b/drivers/regulator/tps6105x-regulator.c
index 1011873896dc..d9278da18a9e 100644
--- a/drivers/regulator/tps6105x-regulator.c
+++ b/drivers/regulator/tps6105x-regulator.c
@@ -151,7 +151,8 @@ static int __devinit tps6105x_regulator_probe(struct platform_device *pdev)
151 /* Register regulator with framework */ 151 /* Register regulator with framework */
152 tps6105x->regulator = regulator_register(&tps6105x_regulator_desc, 152 tps6105x->regulator = regulator_register(&tps6105x_regulator_desc,
153 &tps6105x->client->dev, 153 &tps6105x->client->dev,
154 pdata->regulator_data, tps6105x); 154 pdata->regulator_data, tps6105x,
155 NULL);
155 if (IS_ERR(tps6105x->regulator)) { 156 if (IS_ERR(tps6105x->regulator)) {
156 ret = PTR_ERR(tps6105x->regulator); 157 ret = PTR_ERR(tps6105x->regulator);
157 dev_err(&tps6105x->client->dev, 158 dev_err(&tps6105x->client->dev,
diff --git a/drivers/regulator/tps65023-regulator.c b/drivers/regulator/tps65023-regulator.c
index 9fb4c7b81753..7fd3b9092d1b 100644
--- a/drivers/regulator/tps65023-regulator.c
+++ b/drivers/regulator/tps65023-regulator.c
@@ -496,7 +496,7 @@ static int __devinit tps_65023_probe(struct i2c_client *client,
496 496
497 /* Register the regulators */ 497 /* Register the regulators */
498 rdev = regulator_register(&tps->desc[i], &client->dev, 498 rdev = regulator_register(&tps->desc[i], &client->dev,
499 init_data, tps); 499 init_data, tps, NULL);
500 if (IS_ERR(rdev)) { 500 if (IS_ERR(rdev)) {
501 dev_err(&client->dev, "failed to register %s\n", 501 dev_err(&client->dev, "failed to register %s\n",
502 id->name); 502 id->name);
diff --git a/drivers/regulator/tps6507x-regulator.c b/drivers/regulator/tps6507x-regulator.c
index bdef70365f52..0b63ef71a5fe 100644
--- a/drivers/regulator/tps6507x-regulator.c
+++ b/drivers/regulator/tps6507x-regulator.c
@@ -599,7 +599,7 @@ int tps6507x_pmic_probe(struct platform_device *pdev)
599 tps->desc[i].owner = THIS_MODULE; 599 tps->desc[i].owner = THIS_MODULE;
600 600
601 rdev = regulator_register(&tps->desc[i], 601 rdev = regulator_register(&tps->desc[i],
602 tps6507x_dev->dev, init_data, tps); 602 tps6507x_dev->dev, init_data, tps, NULL);
603 if (IS_ERR(rdev)) { 603 if (IS_ERR(rdev)) {
604 dev_err(tps6507x_dev->dev, 604 dev_err(tps6507x_dev->dev,
605 "failed to register %s regulator\n", 605 "failed to register %s regulator\n",
diff --git a/drivers/regulator/tps6524x-regulator.c b/drivers/regulator/tps6524x-regulator.c
index 9166aa0a9df7..70b7b1f4f000 100644
--- a/drivers/regulator/tps6524x-regulator.c
+++ b/drivers/regulator/tps6524x-regulator.c
@@ -651,7 +651,7 @@ static int __devinit pmic_probe(struct spi_device *spi)
651 hw->desc[i].n_voltages = 1; 651 hw->desc[i].n_voltages = 1;
652 652
653 hw->rdev[i] = regulator_register(&hw->desc[i], dev, 653 hw->rdev[i] = regulator_register(&hw->desc[i], dev,
654 init_data, hw); 654 init_data, hw, NULL);
655 if (IS_ERR(hw->rdev[i])) { 655 if (IS_ERR(hw->rdev[i])) {
656 ret = PTR_ERR(hw->rdev[i]); 656 ret = PTR_ERR(hw->rdev[i]);
657 hw->rdev[i] = NULL; 657 hw->rdev[i] = NULL;
diff --git a/drivers/regulator/tps6586x-regulator.c b/drivers/regulator/tps6586x-regulator.c
index 14b9389dd52a..c75fb20faa57 100644
--- a/drivers/regulator/tps6586x-regulator.c
+++ b/drivers/regulator/tps6586x-regulator.c
@@ -396,7 +396,7 @@ static int __devinit tps6586x_regulator_probe(struct platform_device *pdev)
396 return err; 396 return err;
397 397
398 rdev = regulator_register(&ri->desc, &pdev->dev, 398 rdev = regulator_register(&ri->desc, &pdev->dev,
399 pdev->dev.platform_data, ri); 399 pdev->dev.platform_data, ri, NULL);
400 if (IS_ERR(rdev)) { 400 if (IS_ERR(rdev)) {
401 dev_err(&pdev->dev, "failed to register regulator %s\n", 401 dev_err(&pdev->dev, "failed to register regulator %s\n",
402 ri->desc.name); 402 ri->desc.name);
diff --git a/drivers/regulator/tps65910-regulator.c b/drivers/regulator/tps65910-regulator.c
index 66d2d60b436a..eaea9b4a09d0 100644
--- a/drivers/regulator/tps65910-regulator.c
+++ b/drivers/regulator/tps65910-regulator.c
@@ -963,7 +963,7 @@ static __devinit int tps65910_probe(struct platform_device *pdev)
963 pmic->desc[i].owner = THIS_MODULE; 963 pmic->desc[i].owner = THIS_MODULE;
964 964
965 rdev = regulator_register(&pmic->desc[i], 965 rdev = regulator_register(&pmic->desc[i],
966 tps65910->dev, reg_data, pmic); 966 tps65910->dev, reg_data, pmic, NULL);
967 if (IS_ERR(rdev)) { 967 if (IS_ERR(rdev)) {
968 dev_err(tps65910->dev, 968 dev_err(tps65910->dev,
969 "failed to register %s regulator\n", 969 "failed to register %s regulator\n",
diff --git a/drivers/regulator/tps65912-regulator.c b/drivers/regulator/tps65912-regulator.c
index 39d4a1749e71..da00d88f94b7 100644
--- a/drivers/regulator/tps65912-regulator.c
+++ b/drivers/regulator/tps65912-regulator.c
@@ -727,7 +727,7 @@ static __devinit int tps65912_probe(struct platform_device *pdev)
727 pmic->desc[i].owner = THIS_MODULE; 727 pmic->desc[i].owner = THIS_MODULE;
728 range = tps65912_get_range(pmic, i); 728 range = tps65912_get_range(pmic, i);
729 rdev = regulator_register(&pmic->desc[i], 729 rdev = regulator_register(&pmic->desc[i],
730 tps65912->dev, reg_data, pmic); 730 tps65912->dev, reg_data, pmic, NULL);
731 if (IS_ERR(rdev)) { 731 if (IS_ERR(rdev)) {
732 dev_err(tps65912->dev, 732 dev_err(tps65912->dev,
733 "failed to register %s regulator\n", 733 "failed to register %s regulator\n",
diff --git a/drivers/regulator/twl-regulator.c b/drivers/regulator/twl-regulator.c
index ee8747f4fa08..9a2e07a094b3 100644
--- a/drivers/regulator/twl-regulator.c
+++ b/drivers/regulator/twl-regulator.c
@@ -1070,7 +1070,7 @@ static int __devinit twlreg_probe(struct platform_device *pdev)
1070 break; 1070 break;
1071 } 1071 }
1072 1072
1073 rdev = regulator_register(&info->desc, &pdev->dev, initdata, info); 1073 rdev = regulator_register(&info->desc, &pdev->dev, initdata, info, NULL);
1074 if (IS_ERR(rdev)) { 1074 if (IS_ERR(rdev)) {
1075 dev_err(&pdev->dev, "can't register %s, %ld\n", 1075 dev_err(&pdev->dev, "can't register %s, %ld\n",
1076 info->desc.name, PTR_ERR(rdev)); 1076 info->desc.name, PTR_ERR(rdev));
diff --git a/drivers/regulator/wm831x-dcdc.c b/drivers/regulator/wm831x-dcdc.c
index bd3531d8b2ac..7558a9666a50 100644
--- a/drivers/regulator/wm831x-dcdc.c
+++ b/drivers/regulator/wm831x-dcdc.c
@@ -553,7 +553,7 @@ static __devinit int wm831x_buckv_probe(struct platform_device *pdev)
553 wm831x_buckv_dvs_init(dcdc, pdata->dcdc[id]->driver_data); 553 wm831x_buckv_dvs_init(dcdc, pdata->dcdc[id]->driver_data);
554 554
555 dcdc->regulator = regulator_register(&dcdc->desc, &pdev->dev, 555 dcdc->regulator = regulator_register(&dcdc->desc, &pdev->dev,
556 pdata->dcdc[id], dcdc); 556 pdata->dcdc[id], dcdc, NULL);
557 if (IS_ERR(dcdc->regulator)) { 557 if (IS_ERR(dcdc->regulator)) {
558 ret = PTR_ERR(dcdc->regulator); 558 ret = PTR_ERR(dcdc->regulator);
559 dev_err(wm831x->dev, "Failed to register DCDC%d: %d\n", 559 dev_err(wm831x->dev, "Failed to register DCDC%d: %d\n",
@@ -747,7 +747,7 @@ static __devinit int wm831x_buckp_probe(struct platform_device *pdev)
747 dcdc->desc.owner = THIS_MODULE; 747 dcdc->desc.owner = THIS_MODULE;
748 748
749 dcdc->regulator = regulator_register(&dcdc->desc, &pdev->dev, 749 dcdc->regulator = regulator_register(&dcdc->desc, &pdev->dev,
750 pdata->dcdc[id], dcdc); 750 pdata->dcdc[id], dcdc, NULL);
751 if (IS_ERR(dcdc->regulator)) { 751 if (IS_ERR(dcdc->regulator)) {
752 ret = PTR_ERR(dcdc->regulator); 752 ret = PTR_ERR(dcdc->regulator);
753 dev_err(wm831x->dev, "Failed to register DCDC%d: %d\n", 753 dev_err(wm831x->dev, "Failed to register DCDC%d: %d\n",
@@ -874,7 +874,7 @@ static __devinit int wm831x_boostp_probe(struct platform_device *pdev)
874 dcdc->desc.owner = THIS_MODULE; 874 dcdc->desc.owner = THIS_MODULE;
875 875
876 dcdc->regulator = regulator_register(&dcdc->desc, &pdev->dev, 876 dcdc->regulator = regulator_register(&dcdc->desc, &pdev->dev,
877 pdata->dcdc[id], dcdc); 877 pdata->dcdc[id], dcdc, NULL);
878 if (IS_ERR(dcdc->regulator)) { 878 if (IS_ERR(dcdc->regulator)) {
879 ret = PTR_ERR(dcdc->regulator); 879 ret = PTR_ERR(dcdc->regulator);
880 dev_err(wm831x->dev, "Failed to register DCDC%d: %d\n", 880 dev_err(wm831x->dev, "Failed to register DCDC%d: %d\n",
@@ -973,7 +973,7 @@ static __devinit int wm831x_epe_probe(struct platform_device *pdev)
973 dcdc->desc.owner = THIS_MODULE; 973 dcdc->desc.owner = THIS_MODULE;
974 974
975 dcdc->regulator = regulator_register(&dcdc->desc, &pdev->dev, 975 dcdc->regulator = regulator_register(&dcdc->desc, &pdev->dev,
976 pdata->epe[id], dcdc); 976 pdata->epe[id], dcdc, NULL);
977 if (IS_ERR(dcdc->regulator)) { 977 if (IS_ERR(dcdc->regulator)) {
978 ret = PTR_ERR(dcdc->regulator); 978 ret = PTR_ERR(dcdc->regulator);
979 dev_err(wm831x->dev, "Failed to register EPE%d: %d\n", 979 dev_err(wm831x->dev, "Failed to register EPE%d: %d\n",
diff --git a/drivers/regulator/wm831x-isink.c b/drivers/regulator/wm831x-isink.c
index 01f27c7f4236..d3ad3f5cff46 100644
--- a/drivers/regulator/wm831x-isink.c
+++ b/drivers/regulator/wm831x-isink.c
@@ -189,7 +189,7 @@ static __devinit int wm831x_isink_probe(struct platform_device *pdev)
189 isink->desc.owner = THIS_MODULE; 189 isink->desc.owner = THIS_MODULE;
190 190
191 isink->regulator = regulator_register(&isink->desc, &pdev->dev, 191 isink->regulator = regulator_register(&isink->desc, &pdev->dev,
192 pdata->isink[id], isink); 192 pdata->isink[id], isink, NULL);
193 if (IS_ERR(isink->regulator)) { 193 if (IS_ERR(isink->regulator)) {
194 ret = PTR_ERR(isink->regulator); 194 ret = PTR_ERR(isink->regulator);
195 dev_err(wm831x->dev, "Failed to register ISINK%d: %d\n", 195 dev_err(wm831x->dev, "Failed to register ISINK%d: %d\n",
diff --git a/drivers/regulator/wm831x-ldo.c b/drivers/regulator/wm831x-ldo.c
index 6709710a059e..5e96a2386b1d 100644
--- a/drivers/regulator/wm831x-ldo.c
+++ b/drivers/regulator/wm831x-ldo.c
@@ -351,7 +351,7 @@ static __devinit int wm831x_gp_ldo_probe(struct platform_device *pdev)
351 ldo->desc.owner = THIS_MODULE; 351 ldo->desc.owner = THIS_MODULE;
352 352
353 ldo->regulator = regulator_register(&ldo->desc, &pdev->dev, 353 ldo->regulator = regulator_register(&ldo->desc, &pdev->dev,
354 pdata->ldo[id], ldo); 354 pdata->ldo[id], ldo, NULL);
355 if (IS_ERR(ldo->regulator)) { 355 if (IS_ERR(ldo->regulator)) {
356 ret = PTR_ERR(ldo->regulator); 356 ret = PTR_ERR(ldo->regulator);
357 dev_err(wm831x->dev, "Failed to register LDO%d: %d\n", 357 dev_err(wm831x->dev, "Failed to register LDO%d: %d\n",
@@ -621,7 +621,7 @@ static __devinit int wm831x_aldo_probe(struct platform_device *pdev)
621 ldo->desc.owner = THIS_MODULE; 621 ldo->desc.owner = THIS_MODULE;
622 622
623 ldo->regulator = regulator_register(&ldo->desc, &pdev->dev, 623 ldo->regulator = regulator_register(&ldo->desc, &pdev->dev,
624 pdata->ldo[id], ldo); 624 pdata->ldo[id], ldo, NULL);
625 if (IS_ERR(ldo->regulator)) { 625 if (IS_ERR(ldo->regulator)) {
626 ret = PTR_ERR(ldo->regulator); 626 ret = PTR_ERR(ldo->regulator);
627 dev_err(wm831x->dev, "Failed to register LDO%d: %d\n", 627 dev_err(wm831x->dev, "Failed to register LDO%d: %d\n",
@@ -818,7 +818,7 @@ static __devinit int wm831x_alive_ldo_probe(struct platform_device *pdev)
818 ldo->desc.owner = THIS_MODULE; 818 ldo->desc.owner = THIS_MODULE;
819 819
820 ldo->regulator = regulator_register(&ldo->desc, &pdev->dev, 820 ldo->regulator = regulator_register(&ldo->desc, &pdev->dev,
821 pdata->ldo[id], ldo); 821 pdata->ldo[id], ldo, NULL);
822 if (IS_ERR(ldo->regulator)) { 822 if (IS_ERR(ldo->regulator)) {
823 ret = PTR_ERR(ldo->regulator); 823 ret = PTR_ERR(ldo->regulator);
824 dev_err(wm831x->dev, "Failed to register LDO%d: %d\n", 824 dev_err(wm831x->dev, "Failed to register LDO%d: %d\n",
diff --git a/drivers/regulator/wm8350-regulator.c b/drivers/regulator/wm8350-regulator.c
index 1bcb22c44095..6894009d815a 100644
--- a/drivers/regulator/wm8350-regulator.c
+++ b/drivers/regulator/wm8350-regulator.c
@@ -1428,7 +1428,7 @@ static int wm8350_regulator_probe(struct platform_device *pdev)
1428 /* register regulator */ 1428 /* register regulator */
1429 rdev = regulator_register(&wm8350_reg[pdev->id], &pdev->dev, 1429 rdev = regulator_register(&wm8350_reg[pdev->id], &pdev->dev,
1430 pdev->dev.platform_data, 1430 pdev->dev.platform_data,
1431 dev_get_drvdata(&pdev->dev)); 1431 dev_get_drvdata(&pdev->dev), NULL);
1432 if (IS_ERR(rdev)) { 1432 if (IS_ERR(rdev)) {
1433 dev_err(&pdev->dev, "failed to register %s\n", 1433 dev_err(&pdev->dev, "failed to register %s\n",
1434 wm8350_reg[pdev->id].name); 1434 wm8350_reg[pdev->id].name);
diff --git a/drivers/regulator/wm8400-regulator.c b/drivers/regulator/wm8400-regulator.c
index 71632ddc3781..706f39563a7b 100644
--- a/drivers/regulator/wm8400-regulator.c
+++ b/drivers/regulator/wm8400-regulator.c
@@ -326,7 +326,7 @@ static int __devinit wm8400_regulator_probe(struct platform_device *pdev)
326 struct regulator_dev *rdev; 326 struct regulator_dev *rdev;
327 327
328 rdev = regulator_register(&regulators[pdev->id], &pdev->dev, 328 rdev = regulator_register(&regulators[pdev->id], &pdev->dev,
329 pdev->dev.platform_data, wm8400); 329 pdev->dev.platform_data, wm8400, NULL);
330 330
331 if (IS_ERR(rdev)) 331 if (IS_ERR(rdev))
332 return PTR_ERR(rdev); 332 return PTR_ERR(rdev);
diff --git a/drivers/regulator/wm8994-regulator.c b/drivers/regulator/wm8994-regulator.c
index b87bf5c841f8..435e335d6e67 100644
--- a/drivers/regulator/wm8994-regulator.c
+++ b/drivers/regulator/wm8994-regulator.c
@@ -269,7 +269,7 @@ static __devinit int wm8994_ldo_probe(struct platform_device *pdev)
269 ldo->is_enabled = true; 269 ldo->is_enabled = true;
270 270
271 ldo->regulator = regulator_register(&wm8994_ldo_desc[id], &pdev->dev, 271 ldo->regulator = regulator_register(&wm8994_ldo_desc[id], &pdev->dev,
272 pdata->ldo[id].init_data, ldo); 272 pdata->ldo[id].init_data, ldo, NULL);
273 if (IS_ERR(ldo->regulator)) { 273 if (IS_ERR(ldo->regulator)) {
274 ret = PTR_ERR(ldo->regulator); 274 ret = PTR_ERR(ldo->regulator);
275 dev_err(wm8994->dev, "Failed to register LDO%d: %d\n", 275 dev_err(wm8994->dev, "Failed to register LDO%d: %d\n",
diff --git a/include/linux/regulator/driver.h b/include/linux/regulator/driver.h
index 52c89ae32f64..8fbb6964bb7e 100644
--- a/include/linux/regulator/driver.h
+++ b/include/linux/regulator/driver.h
@@ -212,7 +212,7 @@ struct regulator_dev {
212 212
213struct regulator_dev *regulator_register(struct regulator_desc *regulator_desc, 213struct regulator_dev *regulator_register(struct regulator_desc *regulator_desc,
214 struct device *dev, const struct regulator_init_data *init_data, 214 struct device *dev, const struct regulator_init_data *init_data,
215 void *driver_data); 215 void *driver_data, struct device_node *of_node);
216void regulator_unregister(struct regulator_dev *rdev); 216void regulator_unregister(struct regulator_dev *rdev);
217 217
218int regulator_notifier_call_chain(struct regulator_dev *rdev, 218int regulator_notifier_call_chain(struct regulator_dev *rdev,
diff --git a/sound/soc/codecs/sgtl5000.c b/sound/soc/codecs/sgtl5000.c
index d15695d1c273..fc7ab30572d0 100644
--- a/sound/soc/codecs/sgtl5000.c
+++ b/sound/soc/codecs/sgtl5000.c
@@ -833,7 +833,7 @@ static int ldo_regulator_register(struct snd_soc_codec *codec,
833 ldo->voltage = voltage; 833 ldo->voltage = voltage;
834 834
835 ldo->dev = regulator_register(&ldo->desc, codec->dev, 835 ldo->dev = regulator_register(&ldo->desc, codec->dev,
836 init_data, ldo); 836 init_data, ldo, NULL);
837 if (IS_ERR(ldo->dev)) { 837 if (IS_ERR(ldo->dev)) {
838 int ret = PTR_ERR(ldo->dev); 838 int ret = PTR_ERR(ldo->dev);
839 839