diff options
-rw-r--r-- | drivers/regulator/bq24022.c | 2 | ||||
-rw-r--r-- | drivers/regulator/core.c | 5 | ||||
-rw-r--r-- | drivers/regulator/da903x.c | 3 | ||||
-rw-r--r-- | drivers/regulator/pcf50633-regulator.c | 3 | ||||
-rw-r--r-- | drivers/regulator/wm8350-regulator.c | 2 | ||||
-rw-r--r-- | drivers/regulator/wm8400-regulator.c | 2 | ||||
-rw-r--r-- | include/linux/regulator/driver.h | 3 |
7 files changed, 12 insertions, 8 deletions
diff --git a/drivers/regulator/bq24022.c b/drivers/regulator/bq24022.c index c175e38a4cd5..6804333492eb 100644 --- a/drivers/regulator/bq24022.c +++ b/drivers/regulator/bq24022.c | |||
@@ -105,7 +105,7 @@ static int __init bq24022_probe(struct platform_device *pdev) | |||
105 | ret = gpio_direction_output(pdata->gpio_iset2, 0); | 105 | ret = gpio_direction_output(pdata->gpio_iset2, 0); |
106 | ret = gpio_direction_output(pdata->gpio_nce, 1); | 106 | ret = gpio_direction_output(pdata->gpio_nce, 1); |
107 | 107 | ||
108 | bq24022 = regulator_register(&bq24022_desc, &pdev->dev, pdata); | 108 | bq24022 = regulator_register(&bq24022_desc, &pdev->dev, NULL, pdata); |
109 | if (IS_ERR(bq24022)) { | 109 | if (IS_ERR(bq24022)) { |
110 | dev_dbg(&pdev->dev, "couldn't register regulator\n"); | 110 | dev_dbg(&pdev->dev, "couldn't register regulator\n"); |
111 | ret = PTR_ERR(bq24022); | 111 | ret = PTR_ERR(bq24022); |
diff --git a/drivers/regulator/core.c b/drivers/regulator/core.c index 96c877dd9daf..f17362ac9c61 100644 --- a/drivers/regulator/core.c +++ b/drivers/regulator/core.c | |||
@@ -1879,17 +1879,18 @@ static int add_regulator_attributes(struct regulator_dev *rdev) | |||
1879 | * regulator_register - register regulator | 1879 | * regulator_register - register regulator |
1880 | * @regulator_desc: regulator to register | 1880 | * @regulator_desc: regulator to register |
1881 | * @dev: struct device for the regulator | 1881 | * @dev: struct device for the regulator |
1882 | * @init_data: platform provided init data, passed through by driver | ||
1882 | * @driver_data: private regulator data | 1883 | * @driver_data: private regulator data |
1883 | * | 1884 | * |
1884 | * Called by regulator drivers to register a regulator. | 1885 | * Called by regulator drivers to register a regulator. |
1885 | * Returns 0 on success. | 1886 | * Returns 0 on success. |
1886 | */ | 1887 | */ |
1887 | struct regulator_dev *regulator_register(struct regulator_desc *regulator_desc, | 1888 | struct regulator_dev *regulator_register(struct regulator_desc *regulator_desc, |
1888 | struct device *dev, void *driver_data) | 1889 | struct device *dev, struct regulator_init_data *init_data, |
1890 | void *driver_data) | ||
1889 | { | 1891 | { |
1890 | static atomic_t regulator_no = ATOMIC_INIT(0); | 1892 | static atomic_t regulator_no = ATOMIC_INIT(0); |
1891 | struct regulator_dev *rdev; | 1893 | struct regulator_dev *rdev; |
1892 | struct regulator_init_data *init_data = dev->platform_data; | ||
1893 | int ret, i; | 1894 | int ret, i; |
1894 | 1895 | ||
1895 | if (regulator_desc == NULL) | 1896 | if (regulator_desc == NULL) |
diff --git a/drivers/regulator/da903x.c b/drivers/regulator/da903x.c index fe77730a7edb..72b15495183c 100644 --- a/drivers/regulator/da903x.c +++ b/drivers/regulator/da903x.c | |||
@@ -471,7 +471,8 @@ static int __devinit da903x_regulator_probe(struct platform_device *pdev) | |||
471 | if (ri->desc.id == DA9030_ID_LDO1 || ri->desc.id == DA9030_ID_LDO15) | 471 | if (ri->desc.id == DA9030_ID_LDO1 || ri->desc.id == DA9030_ID_LDO15) |
472 | ri->desc.ops = &da9030_regulator_ldo1_15_ops; | 472 | ri->desc.ops = &da9030_regulator_ldo1_15_ops; |
473 | 473 | ||
474 | rdev = regulator_register(&ri->desc, &pdev->dev, ri); | 474 | rdev = regulator_register(&ri->desc, &pdev->dev, |
475 | pdev->dev.platform_data, ri); | ||
475 | if (IS_ERR(rdev)) { | 476 | if (IS_ERR(rdev)) { |
476 | dev_err(&pdev->dev, "failed to register regulator %s\n", | 477 | dev_err(&pdev->dev, "failed to register regulator %s\n", |
477 | ri->desc.name); | 478 | ri->desc.name); |
diff --git a/drivers/regulator/pcf50633-regulator.c b/drivers/regulator/pcf50633-regulator.c index 4cc85ec6e120..cd761d85c8fd 100644 --- a/drivers/regulator/pcf50633-regulator.c +++ b/drivers/regulator/pcf50633-regulator.c | |||
@@ -284,7 +284,8 @@ static int __devinit pcf50633_regulator_probe(struct platform_device *pdev) | |||
284 | /* Already set by core driver */ | 284 | /* Already set by core driver */ |
285 | pcf = platform_get_drvdata(pdev); | 285 | pcf = platform_get_drvdata(pdev); |
286 | 286 | ||
287 | rdev = regulator_register(®ulators[pdev->id], &pdev->dev, pcf); | 287 | rdev = regulator_register(®ulators[pdev->id], &pdev->dev, |
288 | pdev->dev.platform_data, pcf); | ||
288 | if (IS_ERR(rdev)) | 289 | if (IS_ERR(rdev)) |
289 | return PTR_ERR(rdev); | 290 | return PTR_ERR(rdev); |
290 | 291 | ||
diff --git a/drivers/regulator/wm8350-regulator.c b/drivers/regulator/wm8350-regulator.c index afad611fbb80..93e0ce5a5c23 100644 --- a/drivers/regulator/wm8350-regulator.c +++ b/drivers/regulator/wm8350-regulator.c | |||
@@ -1335,9 +1335,9 @@ static int wm8350_regulator_probe(struct platform_device *pdev) | |||
1335 | break; | 1335 | break; |
1336 | } | 1336 | } |
1337 | 1337 | ||
1338 | |||
1339 | /* register regulator */ | 1338 | /* register regulator */ |
1340 | rdev = regulator_register(&wm8350_reg[pdev->id], &pdev->dev, | 1339 | rdev = regulator_register(&wm8350_reg[pdev->id], &pdev->dev, |
1340 | pdev->dev.platform_data, | ||
1341 | dev_get_drvdata(&pdev->dev)); | 1341 | dev_get_drvdata(&pdev->dev)); |
1342 | if (IS_ERR(rdev)) { | 1342 | if (IS_ERR(rdev)) { |
1343 | dev_err(&pdev->dev, "failed to register %s\n", | 1343 | dev_err(&pdev->dev, "failed to register %s\n", |
diff --git a/drivers/regulator/wm8400-regulator.c b/drivers/regulator/wm8400-regulator.c index 56e23d44ba59..6ed43b0dbdfc 100644 --- a/drivers/regulator/wm8400-regulator.c +++ b/drivers/regulator/wm8400-regulator.c | |||
@@ -294,7 +294,7 @@ static int __devinit wm8400_regulator_probe(struct platform_device *pdev) | |||
294 | struct regulator_dev *rdev; | 294 | struct regulator_dev *rdev; |
295 | 295 | ||
296 | rdev = regulator_register(®ulators[pdev->id], &pdev->dev, | 296 | rdev = regulator_register(®ulators[pdev->id], &pdev->dev, |
297 | pdev->dev.driver_data); | 297 | pdev->dev.platform_data, pdev->dev.driver_data); |
298 | 298 | ||
299 | if (IS_ERR(rdev)) | 299 | if (IS_ERR(rdev)) |
300 | return PTR_ERR(rdev); | 300 | return PTR_ERR(rdev); |
diff --git a/include/linux/regulator/driver.h b/include/linux/regulator/driver.h index 6e957aae7629..2254ad93b784 100644 --- a/include/linux/regulator/driver.h +++ b/include/linux/regulator/driver.h | |||
@@ -138,7 +138,8 @@ struct regulator_desc { | |||
138 | }; | 138 | }; |
139 | 139 | ||
140 | struct regulator_dev *regulator_register(struct regulator_desc *regulator_desc, | 140 | struct regulator_dev *regulator_register(struct regulator_desc *regulator_desc, |
141 | struct device *dev, void *driver_data); | 141 | struct device *dev, struct regulator_init_data *init_data, |
142 | void *driver_data); | ||
142 | void regulator_unregister(struct regulator_dev *rdev); | 143 | void regulator_unregister(struct regulator_dev *rdev); |
143 | 144 | ||
144 | int regulator_notifier_call_chain(struct regulator_dev *rdev, | 145 | int regulator_notifier_call_chain(struct regulator_dev *rdev, |