aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/regulator
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/regulator')
-rw-r--r--drivers/regulator/88pm800.c2
-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/ad5398.c2
-rw-r--r--drivers/regulator/da903x.c2
-rw-r--r--drivers/regulator/da9052-regulator.c2
-rw-r--r--drivers/regulator/da9055-regulator.c2
-rw-r--r--drivers/regulator/fan53555.c2
-rw-r--r--drivers/regulator/fixed.c2
-rw-r--r--drivers/regulator/gpio-regulator.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/lp872x.c2
-rw-r--r--drivers/regulator/lp8755.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/max8973-regulator.c2
-rw-r--r--drivers/regulator/palmas-regulator.c2
-rw-r--r--drivers/regulator/pcap-regulator.c2
-rw-r--r--drivers/regulator/pcf50633-regulator.c2
-rw-r--r--drivers/regulator/tps51632-regulator.c2
-rw-r--r--drivers/regulator/tps62360-regulator.c2
-rw-r--r--drivers/regulator/tps65023-regulator.c2
-rw-r--r--drivers/regulator/tps6524x-regulator.c2
-rw-r--r--drivers/regulator/twl-regulator.c2
-rw-r--r--drivers/regulator/userspace-consumer.c2
-rw-r--r--drivers/regulator/virtual.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
38 files changed, 43 insertions, 43 deletions
diff --git a/drivers/regulator/88pm800.c b/drivers/regulator/88pm800.c
index b4c29b1c52a5..c72fe95e443f 100644
--- a/drivers/regulator/88pm800.c
+++ b/drivers/regulator/88pm800.c
@@ -283,7 +283,7 @@ static int pm800_regulator_dt_init(struct platform_device *pdev)
283static int pm800_regulator_probe(struct platform_device *pdev) 283static int pm800_regulator_probe(struct platform_device *pdev)
284{ 284{
285 struct pm80x_chip *chip = dev_get_drvdata(pdev->dev.parent); 285 struct pm80x_chip *chip = dev_get_drvdata(pdev->dev.parent);
286 struct pm80x_platform_data *pdata = pdev->dev.parent->platform_data; 286 struct pm80x_platform_data *pdata = dev_get_platdata(pdev->dev.parent);
287 struct pm800_regulators *pm800_data; 287 struct pm800_regulators *pm800_data;
288 struct pm800_regulator_info *info; 288 struct pm800_regulator_info *info;
289 struct regulator_config config = { }; 289 struct regulator_config config = { };
diff --git a/drivers/regulator/88pm8607.c b/drivers/regulator/88pm8607.c
index 8a7cb1f43046..70230974468c 100644
--- a/drivers/regulator/88pm8607.c
+++ b/drivers/regulator/88pm8607.c
@@ -346,7 +346,7 @@ static int pm8607_regulator_probe(struct platform_device *pdev)
346{ 346{
347 struct pm860x_chip *chip = dev_get_drvdata(pdev->dev.parent); 347 struct pm860x_chip *chip = dev_get_drvdata(pdev->dev.parent);
348 struct pm8607_regulator_info *info = NULL; 348 struct pm8607_regulator_info *info = NULL;
349 struct regulator_init_data *pdata = pdev->dev.platform_data; 349 struct regulator_init_data *pdata = dev_get_platdata(&pdev->dev);
350 struct regulator_config config = { }; 350 struct regulator_config config = { };
351 struct resource *res; 351 struct resource *res;
352 int i; 352 int i;
diff --git a/drivers/regulator/aat2870-regulator.c b/drivers/regulator/aat2870-regulator.c
index 8b5876356db9..881159dfcb5e 100644
--- a/drivers/regulator/aat2870-regulator.c
+++ b/drivers/regulator/aat2870-regulator.c
@@ -174,7 +174,7 @@ static int aat2870_regulator_probe(struct platform_device *pdev)
174 174
175 config.dev = &pdev->dev; 175 config.dev = &pdev->dev;
176 config.driver_data = ri; 176 config.driver_data = ri;
177 config.init_data = pdev->dev.platform_data; 177 config.init_data = dev_get_platdata(&pdev->dev);
178 178
179 rdev = regulator_register(&ri->desc, &config); 179 rdev = regulator_register(&ri->desc, &config);
180 if (IS_ERR(rdev)) { 180 if (IS_ERR(rdev)) {
diff --git a/drivers/regulator/ab3100.c b/drivers/regulator/ab3100.c
index 3be9e46594a1..7d5eaa874b2d 100644
--- a/drivers/regulator/ab3100.c
+++ b/drivers/regulator/ab3100.c
@@ -660,7 +660,7 @@ ab3100_regulator_of_probe(struct platform_device *pdev, struct device_node *np)
660 660
661static int ab3100_regulators_probe(struct platform_device *pdev) 661static int ab3100_regulators_probe(struct platform_device *pdev)
662{ 662{
663 struct ab3100_platform_data *plfdata = pdev->dev.platform_data; 663 struct ab3100_platform_data *plfdata = dev_get_platdata(&pdev->dev);
664 struct device_node *np = pdev->dev.of_node; 664 struct device_node *np = pdev->dev.of_node;
665 int err = 0; 665 int err = 0;
666 u8 data; 666 u8 data;
diff --git a/drivers/regulator/ad5398.c b/drivers/regulator/ad5398.c
index 6b981b5faa70..b2b203cb6b2f 100644
--- a/drivers/regulator/ad5398.c
+++ b/drivers/regulator/ad5398.c
@@ -214,7 +214,7 @@ MODULE_DEVICE_TABLE(i2c, ad5398_id);
214static int ad5398_probe(struct i2c_client *client, 214static int ad5398_probe(struct i2c_client *client,
215 const struct i2c_device_id *id) 215 const struct i2c_device_id *id)
216{ 216{
217 struct regulator_init_data *init_data = client->dev.platform_data; 217 struct regulator_init_data *init_data = dev_get_platdata(&client->dev);
218 struct regulator_config config = { }; 218 struct regulator_config config = { };
219 struct ad5398_chip_info *chip; 219 struct ad5398_chip_info *chip;
220 const struct ad5398_current_data_format *df = 220 const struct ad5398_current_data_format *df =
diff --git a/drivers/regulator/da903x.c b/drivers/regulator/da903x.c
index 2afa5730f324..d9799793308c 100644
--- a/drivers/regulator/da903x.c
+++ b/drivers/regulator/da903x.c
@@ -485,7 +485,7 @@ static int da903x_regulator_probe(struct platform_device *pdev)
485 ri->desc.ops = &da9030_regulator_ldo1_15_ops; 485 ri->desc.ops = &da9030_regulator_ldo1_15_ops;
486 486
487 config.dev = &pdev->dev; 487 config.dev = &pdev->dev;
488 config.init_data = pdev->dev.platform_data; 488 config.init_data = dev_get_platdata(&pdev->dev);
489 config.driver_data = ri; 489 config.driver_data = ri;
490 490
491 rdev = regulator_register(&ri->desc, &config); 491 rdev = regulator_register(&ri->desc, &config);
diff --git a/drivers/regulator/da9052-regulator.c b/drivers/regulator/da9052-regulator.c
index 96b569abb46c..1e4d483f6163 100644
--- a/drivers/regulator/da9052-regulator.c
+++ b/drivers/regulator/da9052-regulator.c
@@ -349,7 +349,7 @@ static int da9052_regulator_probe(struct platform_device *pdev)
349 return -ENOMEM; 349 return -ENOMEM;
350 350
351 da9052 = dev_get_drvdata(pdev->dev.parent); 351 da9052 = dev_get_drvdata(pdev->dev.parent);
352 pdata = da9052->dev->platform_data; 352 pdata = dev_get_platdata(da9052->dev);
353 regulator->da9052 = da9052; 353 regulator->da9052 = da9052;
354 354
355 regulator->info = find_regulator_info(regulator->da9052->chip_id, 355 regulator->info = find_regulator_info(regulator->da9052->chip_id,
diff --git a/drivers/regulator/da9055-regulator.c b/drivers/regulator/da9055-regulator.c
index 30221099d09c..77b53e5a231c 100644
--- a/drivers/regulator/da9055-regulator.c
+++ b/drivers/regulator/da9055-regulator.c
@@ -535,7 +535,7 @@ static int da9055_regulator_probe(struct platform_device *pdev)
535 struct regulator_config config = { }; 535 struct regulator_config config = { };
536 struct da9055_regulator *regulator; 536 struct da9055_regulator *regulator;
537 struct da9055 *da9055 = dev_get_drvdata(pdev->dev.parent); 537 struct da9055 *da9055 = dev_get_drvdata(pdev->dev.parent);
538 struct da9055_pdata *pdata = da9055->dev->platform_data; 538 struct da9055_pdata *pdata = dev_get_platdata(da9055->dev);
539 int ret, irq; 539 int ret, irq;
540 540
541 if (pdata == NULL || pdata->regulators[pdev->id] == NULL) 541 if (pdata == NULL || pdata->regulators[pdev->id] == NULL)
diff --git a/drivers/regulator/fan53555.c b/drivers/regulator/fan53555.c
index f0e1ae52bb05..a32b44272a05 100644
--- a/drivers/regulator/fan53555.c
+++ b/drivers/regulator/fan53555.c
@@ -237,7 +237,7 @@ static int fan53555_regulator_probe(struct i2c_client *client,
237 unsigned int val; 237 unsigned int val;
238 int ret; 238 int ret;
239 239
240 pdata = client->dev.platform_data; 240 pdata = dev_get_platdata(&client->dev);
241 if (!pdata || !pdata->regulator) { 241 if (!pdata || !pdata->regulator) {
242 dev_err(&client->dev, "Platform data not found!\n"); 242 dev_err(&client->dev, "Platform data not found!\n");
243 return -ENODEV; 243 return -ENODEV;
diff --git a/drivers/regulator/fixed.c b/drivers/regulator/fixed.c
index e5c03b534fae..7610920014d7 100644
--- a/drivers/regulator/fixed.c
+++ b/drivers/regulator/fixed.c
@@ -146,7 +146,7 @@ static int reg_fixed_voltage_probe(struct platform_device *pdev)
146 if (IS_ERR(config)) 146 if (IS_ERR(config))
147 return PTR_ERR(config); 147 return PTR_ERR(config);
148 } else { 148 } else {
149 config = pdev->dev.platform_data; 149 config = dev_get_platdata(&pdev->dev);
150 } 150 }
151 151
152 if (!config) 152 if (!config)
diff --git a/drivers/regulator/gpio-regulator.c b/drivers/regulator/gpio-regulator.c
index 9d39eb4aafa3..98a98ffa7fe0 100644
--- a/drivers/regulator/gpio-regulator.c
+++ b/drivers/regulator/gpio-regulator.c
@@ -219,7 +219,7 @@ static struct regulator_ops gpio_regulator_current_ops = {
219 219
220static int gpio_regulator_probe(struct platform_device *pdev) 220static int gpio_regulator_probe(struct platform_device *pdev)
221{ 221{
222 struct gpio_regulator_config *config = pdev->dev.platform_data; 222 struct gpio_regulator_config *config = dev_get_platdata(&pdev->dev);
223 struct device_node *np = pdev->dev.of_node; 223 struct device_node *np = pdev->dev.of_node;
224 struct gpio_regulator_data *drvdata; 224 struct gpio_regulator_data *drvdata;
225 struct regulator_config cfg = { }; 225 struct regulator_config cfg = { };
diff --git a/drivers/regulator/isl6271a-regulator.c b/drivers/regulator/isl6271a-regulator.c
index b99c49b9aff0..88c1a3acf563 100644
--- a/drivers/regulator/isl6271a-regulator.c
+++ b/drivers/regulator/isl6271a-regulator.c
@@ -110,7 +110,7 @@ static int isl6271a_probe(struct i2c_client *i2c,
110 const struct i2c_device_id *id) 110 const struct i2c_device_id *id)
111{ 111{
112 struct regulator_config config = { }; 112 struct regulator_config config = { };
113 struct regulator_init_data *init_data = i2c->dev.platform_data; 113 struct regulator_init_data *init_data = dev_get_platdata(&i2c->dev);
114 struct isl_pmic *pmic; 114 struct isl_pmic *pmic;
115 int err, i; 115 int err, i;
116 116
diff --git a/drivers/regulator/lp3971.c b/drivers/regulator/lp3971.c
index 3809b4381606..5a4604ee5ea5 100644
--- a/drivers/regulator/lp3971.c
+++ b/drivers/regulator/lp3971.c
@@ -425,7 +425,7 @@ static int lp3971_i2c_probe(struct i2c_client *i2c,
425 const struct i2c_device_id *id) 425 const struct i2c_device_id *id)
426{ 426{
427 struct lp3971 *lp3971; 427 struct lp3971 *lp3971;
428 struct lp3971_platform_data *pdata = i2c->dev.platform_data; 428 struct lp3971_platform_data *pdata = dev_get_platdata(&i2c->dev);
429 int ret; 429 int ret;
430 u16 val; 430 u16 val;
431 431
diff --git a/drivers/regulator/lp3972.c b/drivers/regulator/lp3972.c
index 573024039ca0..093e6f44ff8a 100644
--- a/drivers/regulator/lp3972.c
+++ b/drivers/regulator/lp3972.c
@@ -519,7 +519,7 @@ static int lp3972_i2c_probe(struct i2c_client *i2c,
519 const struct i2c_device_id *id) 519 const struct i2c_device_id *id)
520{ 520{
521 struct lp3972 *lp3972; 521 struct lp3972 *lp3972;
522 struct lp3972_platform_data *pdata = i2c->dev.platform_data; 522 struct lp3972_platform_data *pdata = dev_get_platdata(&i2c->dev);
523 int ret; 523 int ret;
524 u16 val; 524 u16 val;
525 525
diff --git a/drivers/regulator/lp872x.c b/drivers/regulator/lp872x.c
index b16336bcd4d4..2b67c80fab6a 100644
--- a/drivers/regulator/lp872x.c
+++ b/drivers/regulator/lp872x.c
@@ -961,7 +961,7 @@ static int lp872x_probe(struct i2c_client *cl, const struct i2c_device_id *id)
961 } 961 }
962 962
963 lp->dev = &cl->dev; 963 lp->dev = &cl->dev;
964 lp->pdata = cl->dev.platform_data; 964 lp->pdata = dev_get_platdata(&cl->dev);
965 lp->chipid = id->driver_data; 965 lp->chipid = id->driver_data;
966 lp->num_regulators = num_regulators; 966 lp->num_regulators = num_regulators;
967 i2c_set_clientdata(cl, lp); 967 i2c_set_clientdata(cl, lp);
diff --git a/drivers/regulator/lp8755.c b/drivers/regulator/lp8755.c
index d9e38b4c2adc..7507db44bf26 100644
--- a/drivers/regulator/lp8755.c
+++ b/drivers/regulator/lp8755.c
@@ -449,7 +449,7 @@ static int lp8755_probe(struct i2c_client *client,
449{ 449{
450 int ret, icnt; 450 int ret, icnt;
451 struct lp8755_chip *pchip; 451 struct lp8755_chip *pchip;
452 struct lp8755_platform_data *pdata = client->dev.platform_data; 452 struct lp8755_platform_data *pdata = dev_get_platdata(&client->dev);
453 453
454 if (!i2c_check_functionality(client->adapter, I2C_FUNC_I2C)) { 454 if (!i2c_check_functionality(client->adapter, I2C_FUNC_I2C)) {
455 dev_err(&client->dev, "i2c functionality check fail.\n"); 455 dev_err(&client->dev, "i2c functionality check fail.\n");
diff --git a/drivers/regulator/max1586.c b/drivers/regulator/max1586.c
index 54af61015814..3a599ee0a456 100644
--- a/drivers/regulator/max1586.c
+++ b/drivers/regulator/max1586.c
@@ -163,7 +163,7 @@ static int max1586_pmic_probe(struct i2c_client *client,
163 const struct i2c_device_id *i2c_id) 163 const struct i2c_device_id *i2c_id)
164{ 164{
165 struct regulator_dev **rdev; 165 struct regulator_dev **rdev;
166 struct max1586_platform_data *pdata = client->dev.platform_data; 166 struct max1586_platform_data *pdata = dev_get_platdata(&client->dev);
167 struct regulator_config config = { }; 167 struct regulator_config config = { };
168 struct max1586_data *max1586; 168 struct max1586_data *max1586;
169 int i, id, ret = -ENOMEM; 169 int i, id, ret = -ENOMEM;
diff --git a/drivers/regulator/max8649.c b/drivers/regulator/max8649.c
index db6c9be10f3f..19c6f08eafd5 100644
--- a/drivers/regulator/max8649.c
+++ b/drivers/regulator/max8649.c
@@ -152,7 +152,7 @@ static struct regmap_config max8649_regmap_config = {
152static int max8649_regulator_probe(struct i2c_client *client, 152static int max8649_regulator_probe(struct i2c_client *client,
153 const struct i2c_device_id *id) 153 const struct i2c_device_id *id)
154{ 154{
155 struct max8649_platform_data *pdata = client->dev.platform_data; 155 struct max8649_platform_data *pdata = dev_get_platdata(&client->dev);
156 struct max8649_regulator_info *info = NULL; 156 struct max8649_regulator_info *info = NULL;
157 struct regulator_config config = { }; 157 struct regulator_config config = { };
158 unsigned int val; 158 unsigned int val;
diff --git a/drivers/regulator/max8660.c b/drivers/regulator/max8660.c
index d428ef9a626f..bfd41084c7df 100644
--- a/drivers/regulator/max8660.c
+++ b/drivers/regulator/max8660.c
@@ -309,7 +309,7 @@ static int max8660_probe(struct i2c_client *client,
309 const struct i2c_device_id *i2c_id) 309 const struct i2c_device_id *i2c_id)
310{ 310{
311 struct regulator_dev **rdev; 311 struct regulator_dev **rdev;
312 struct max8660_platform_data *pdata = client->dev.platform_data; 312 struct max8660_platform_data *pdata = dev_get_platdata(&client->dev);
313 struct regulator_config config = { }; 313 struct regulator_config config = { };
314 struct max8660 *max8660; 314 struct max8660 *max8660;
315 int boot_on, i, id, ret = -EINVAL; 315 int boot_on, i, id, ret = -EINVAL;
diff --git a/drivers/regulator/max8925-regulator.c b/drivers/regulator/max8925-regulator.c
index e6d54a546d36..d80b5fa758ae 100644
--- a/drivers/regulator/max8925-regulator.c
+++ b/drivers/regulator/max8925-regulator.c
@@ -277,7 +277,7 @@ static int max8925_regulator_dt_init(struct platform_device *pdev,
277static int max8925_regulator_probe(struct platform_device *pdev) 277static int max8925_regulator_probe(struct platform_device *pdev)
278{ 278{
279 struct max8925_chip *chip = dev_get_drvdata(pdev->dev.parent); 279 struct max8925_chip *chip = dev_get_drvdata(pdev->dev.parent);
280 struct regulator_init_data *pdata = pdev->dev.platform_data; 280 struct regulator_init_data *pdata = dev_get_platdata(&pdev->dev);
281 struct regulator_config config = { }; 281 struct regulator_config config = { };
282 struct max8925_regulator_info *ri; 282 struct max8925_regulator_info *ri;
283 struct resource *res; 283 struct resource *res;
diff --git a/drivers/regulator/max8952.c b/drivers/regulator/max8952.c
index 5259c2fea90a..788e5ae2af1b 100644
--- a/drivers/regulator/max8952.c
+++ b/drivers/regulator/max8952.c
@@ -196,7 +196,7 @@ static int max8952_pmic_probe(struct i2c_client *client,
196 const struct i2c_device_id *i2c_id) 196 const struct i2c_device_id *i2c_id)
197{ 197{
198 struct i2c_adapter *adapter = to_i2c_adapter(client->dev.parent); 198 struct i2c_adapter *adapter = to_i2c_adapter(client->dev.parent);
199 struct max8952_platform_data *pdata = client->dev.platform_data; 199 struct max8952_platform_data *pdata = dev_get_platdata(&client->dev);
200 struct regulator_config config = { }; 200 struct regulator_config config = { };
201 struct max8952_data *max8952; 201 struct max8952_data *max8952;
202 202
diff --git a/drivers/regulator/max8973-regulator.c b/drivers/regulator/max8973-regulator.c
index 0c5195a842e2..5b77ab7762e4 100644
--- a/drivers/regulator/max8973-regulator.c
+++ b/drivers/regulator/max8973-regulator.c
@@ -371,7 +371,7 @@ static int max8973_probe(struct i2c_client *client,
371 struct max8973_chip *max; 371 struct max8973_chip *max;
372 int ret; 372 int ret;
373 373
374 pdata = client->dev.platform_data; 374 pdata = dev_get_platdata(&client->dev);
375 375
376 if (!pdata && !client->dev.of_node) { 376 if (!pdata && !client->dev.of_node) {
377 dev_err(&client->dev, "No Platform data"); 377 dev_err(&client->dev, "No Platform data");
diff --git a/drivers/regulator/palmas-regulator.c b/drivers/regulator/palmas-regulator.c
index d0c87856dd25..e8877e4e5a5a 100644
--- a/drivers/regulator/palmas-regulator.c
+++ b/drivers/regulator/palmas-regulator.c
@@ -765,7 +765,7 @@ static void palmas_dt_to_pdata(struct device *dev,
765static int palmas_regulators_probe(struct platform_device *pdev) 765static int palmas_regulators_probe(struct platform_device *pdev)
766{ 766{
767 struct palmas *palmas = dev_get_drvdata(pdev->dev.parent); 767 struct palmas *palmas = dev_get_drvdata(pdev->dev.parent);
768 struct palmas_pmic_platform_data *pdata = pdev->dev.platform_data; 768 struct palmas_pmic_platform_data *pdata = dev_get_platdata(&pdev->dev);
769 struct device_node *node = pdev->dev.of_node; 769 struct device_node *node = pdev->dev.of_node;
770 struct regulator_dev *rdev; 770 struct regulator_dev *rdev;
771 struct regulator_config config = { }; 771 struct regulator_config config = { };
diff --git a/drivers/regulator/pcap-regulator.c b/drivers/regulator/pcap-regulator.c
index 1a73a297fe73..b49eaeedea84 100644
--- a/drivers/regulator/pcap-regulator.c
+++ b/drivers/regulator/pcap-regulator.c
@@ -243,7 +243,7 @@ static int pcap_regulator_probe(struct platform_device *pdev)
243 struct regulator_config config = { }; 243 struct regulator_config config = { };
244 244
245 config.dev = &pdev->dev; 245 config.dev = &pdev->dev;
246 config.init_data = pdev->dev.platform_data; 246 config.init_data = dev_get_platdata(&pdev->dev);
247 config.driver_data = pcap; 247 config.driver_data = pcap;
248 248
249 rdev = regulator_register(&pcap_regulators[pdev->id], &config); 249 rdev = regulator_register(&pcap_regulators[pdev->id], &config);
diff --git a/drivers/regulator/pcf50633-regulator.c b/drivers/regulator/pcf50633-regulator.c
index 54df9f7cb504..0f3576d48abf 100644
--- a/drivers/regulator/pcf50633-regulator.c
+++ b/drivers/regulator/pcf50633-regulator.c
@@ -86,7 +86,7 @@ static int pcf50633_regulator_probe(struct platform_device *pdev)
86 pcf = dev_to_pcf50633(pdev->dev.parent); 86 pcf = dev_to_pcf50633(pdev->dev.parent);
87 87
88 config.dev = &pdev->dev; 88 config.dev = &pdev->dev;
89 config.init_data = pdev->dev.platform_data; 89 config.init_data = dev_get_platdata(&pdev->dev);
90 config.driver_data = pcf; 90 config.driver_data = pcf;
91 config.regmap = pcf->regmap; 91 config.regmap = pcf->regmap;
92 92
diff --git a/drivers/regulator/tps51632-regulator.c b/drivers/regulator/tps51632-regulator.c
index 6e67be75ea1b..9392a7ca3d2d 100644
--- a/drivers/regulator/tps51632-regulator.c
+++ b/drivers/regulator/tps51632-regulator.c
@@ -275,7 +275,7 @@ static int tps51632_probe(struct i2c_client *client,
275 } 275 }
276 } 276 }
277 277
278 pdata = client->dev.platform_data; 278 pdata = dev_get_platdata(&client->dev);
279 if (!pdata && client->dev.of_node) 279 if (!pdata && client->dev.of_node)
280 pdata = of_get_tps51632_platform_data(&client->dev); 280 pdata = of_get_tps51632_platform_data(&client->dev);
281 if (!pdata) { 281 if (!pdata) {
diff --git a/drivers/regulator/tps62360-regulator.c b/drivers/regulator/tps62360-regulator.c
index a490d5b749b2..0b7ebb1ebf85 100644
--- a/drivers/regulator/tps62360-regulator.c
+++ b/drivers/regulator/tps62360-regulator.c
@@ -350,7 +350,7 @@ static int tps62360_probe(struct i2c_client *client,
350 int i; 350 int i;
351 int chip_id; 351 int chip_id;
352 352
353 pdata = client->dev.platform_data; 353 pdata = dev_get_platdata(&client->dev);
354 354
355 if (client->dev.of_node) { 355 if (client->dev.of_node) {
356 const struct of_device_id *match; 356 const struct of_device_id *match;
diff --git a/drivers/regulator/tps65023-regulator.c b/drivers/regulator/tps65023-regulator.c
index 9d053e23e9eb..a15263d4bdff 100644
--- a/drivers/regulator/tps65023-regulator.c
+++ b/drivers/regulator/tps65023-regulator.c
@@ -218,7 +218,7 @@ static int tps_65023_probe(struct i2c_client *client,
218 * init_data points to array of regulator_init structures 218 * init_data points to array of regulator_init structures
219 * coming from the board-evm file. 219 * coming from the board-evm file.
220 */ 220 */
221 init_data = client->dev.platform_data; 221 init_data = dev_get_platdata(&client->dev);
222 if (!init_data) 222 if (!init_data)
223 return -EIO; 223 return -EIO;
224 224
diff --git a/drivers/regulator/tps6524x-regulator.c b/drivers/regulator/tps6524x-regulator.c
index 1094393155ed..62e8d28beabd 100644
--- a/drivers/regulator/tps6524x-regulator.c
+++ b/drivers/regulator/tps6524x-regulator.c
@@ -601,7 +601,7 @@ static int pmic_probe(struct spi_device *spi)
601 struct regulator_config config = { }; 601 struct regulator_config config = { };
602 int ret = 0, i; 602 int ret = 0, i;
603 603
604 init_data = dev->platform_data; 604 init_data = dev_get_platdata(dev);
605 if (!init_data) { 605 if (!init_data) {
606 dev_err(dev, "could not find regulator platform data\n"); 606 dev_err(dev, "could not find regulator platform data\n");
607 return -EINVAL; 607 return -EINVAL;
diff --git a/drivers/regulator/twl-regulator.c b/drivers/regulator/twl-regulator.c
index 93bc4f456da4..78aae4cbb004 100644
--- a/drivers/regulator/twl-regulator.c
+++ b/drivers/regulator/twl-regulator.c
@@ -1108,7 +1108,7 @@ static int twlreg_probe(struct platform_device *pdev)
1108 drvdata = NULL; 1108 drvdata = NULL;
1109 } else { 1109 } else {
1110 id = pdev->id; 1110 id = pdev->id;
1111 initdata = pdev->dev.platform_data; 1111 initdata = dev_get_platdata(&pdev->dev);
1112 for (i = 0, template = NULL; i < ARRAY_SIZE(twl_of_match); i++) { 1112 for (i = 0, template = NULL; i < ARRAY_SIZE(twl_of_match); i++) {
1113 template = twl_of_match[i].data; 1113 template = twl_of_match[i].data;
1114 if (template && template->desc.id == id) 1114 if (template && template->desc.id == id)
diff --git a/drivers/regulator/userspace-consumer.c b/drivers/regulator/userspace-consumer.c
index a7c8deb5f28f..765acc11c9c8 100644
--- a/drivers/regulator/userspace-consumer.c
+++ b/drivers/regulator/userspace-consumer.c
@@ -111,7 +111,7 @@ static int regulator_userspace_consumer_probe(struct platform_device *pdev)
111 struct userspace_consumer_data *drvdata; 111 struct userspace_consumer_data *drvdata;
112 int ret; 112 int ret;
113 113
114 pdata = pdev->dev.platform_data; 114 pdata = dev_get_platdata(&pdev->dev);
115 if (!pdata) 115 if (!pdata)
116 return -EINVAL; 116 return -EINVAL;
117 117
diff --git a/drivers/regulator/virtual.c b/drivers/regulator/virtual.c
index a9d4284ea007..f53e78b9a84e 100644
--- a/drivers/regulator/virtual.c
+++ b/drivers/regulator/virtual.c
@@ -287,7 +287,7 @@ static const struct attribute_group regulator_virtual_attr_group = {
287 287
288static int regulator_virtual_probe(struct platform_device *pdev) 288static int regulator_virtual_probe(struct platform_device *pdev)
289{ 289{
290 char *reg_id = pdev->dev.platform_data; 290 char *reg_id = dev_get_platdata(&pdev->dev);
291 struct virtual_consumer_data *drvdata; 291 struct virtual_consumer_data *drvdata;
292 int ret; 292 int ret;
293 293
diff --git a/drivers/regulator/wm831x-dcdc.c b/drivers/regulator/wm831x-dcdc.c
index 46938cf162ad..11861cb861df 100644
--- a/drivers/regulator/wm831x-dcdc.c
+++ b/drivers/regulator/wm831x-dcdc.c
@@ -451,7 +451,7 @@ static void wm831x_buckv_dvs_init(struct wm831x_dcdc *dcdc,
451static int wm831x_buckv_probe(struct platform_device *pdev) 451static int wm831x_buckv_probe(struct platform_device *pdev)
452{ 452{
453 struct wm831x *wm831x = dev_get_drvdata(pdev->dev.parent); 453 struct wm831x *wm831x = dev_get_drvdata(pdev->dev.parent);
454 struct wm831x_pdata *pdata = wm831x->dev->platform_data; 454 struct wm831x_pdata *pdata = dev_get_platdata(wm831x->dev);
455 struct regulator_config config = { }; 455 struct regulator_config config = { };
456 int id; 456 int id;
457 struct wm831x_dcdc *dcdc; 457 struct wm831x_dcdc *dcdc;
@@ -624,7 +624,7 @@ static struct regulator_ops wm831x_buckp_ops = {
624static int wm831x_buckp_probe(struct platform_device *pdev) 624static int wm831x_buckp_probe(struct platform_device *pdev)
625{ 625{
626 struct wm831x *wm831x = dev_get_drvdata(pdev->dev.parent); 626 struct wm831x *wm831x = dev_get_drvdata(pdev->dev.parent);
627 struct wm831x_pdata *pdata = wm831x->dev->platform_data; 627 struct wm831x_pdata *pdata = dev_get_platdata(wm831x->dev);
628 struct regulator_config config = { }; 628 struct regulator_config config = { };
629 int id; 629 int id;
630 struct wm831x_dcdc *dcdc; 630 struct wm831x_dcdc *dcdc;
@@ -770,7 +770,7 @@ static struct regulator_ops wm831x_boostp_ops = {
770static int wm831x_boostp_probe(struct platform_device *pdev) 770static int wm831x_boostp_probe(struct platform_device *pdev)
771{ 771{
772 struct wm831x *wm831x = dev_get_drvdata(pdev->dev.parent); 772 struct wm831x *wm831x = dev_get_drvdata(pdev->dev.parent);
773 struct wm831x_pdata *pdata = wm831x->dev->platform_data; 773 struct wm831x_pdata *pdata = dev_get_platdata(wm831x->dev);
774 struct regulator_config config = { }; 774 struct regulator_config config = { };
775 int id = pdev->id % ARRAY_SIZE(pdata->dcdc); 775 int id = pdev->id % ARRAY_SIZE(pdata->dcdc);
776 struct wm831x_dcdc *dcdc; 776 struct wm831x_dcdc *dcdc;
@@ -880,7 +880,7 @@ static struct regulator_ops wm831x_epe_ops = {
880static int wm831x_epe_probe(struct platform_device *pdev) 880static int wm831x_epe_probe(struct platform_device *pdev)
881{ 881{
882 struct wm831x *wm831x = dev_get_drvdata(pdev->dev.parent); 882 struct wm831x *wm831x = dev_get_drvdata(pdev->dev.parent);
883 struct wm831x_pdata *pdata = wm831x->dev->platform_data; 883 struct wm831x_pdata *pdata = dev_get_platdata(wm831x->dev);
884 struct regulator_config config = { }; 884 struct regulator_config config = { };
885 int id = pdev->id % ARRAY_SIZE(pdata->epe); 885 int id = pdev->id % ARRAY_SIZE(pdata->epe);
886 struct wm831x_dcdc *dcdc; 886 struct wm831x_dcdc *dcdc;
diff --git a/drivers/regulator/wm831x-isink.c b/drivers/regulator/wm831x-isink.c
index 16ebdf94d0a0..4eb373de1fac 100644
--- a/drivers/regulator/wm831x-isink.c
+++ b/drivers/regulator/wm831x-isink.c
@@ -151,7 +151,7 @@ static irqreturn_t wm831x_isink_irq(int irq, void *data)
151static int wm831x_isink_probe(struct platform_device *pdev) 151static int wm831x_isink_probe(struct platform_device *pdev)
152{ 152{
153 struct wm831x *wm831x = dev_get_drvdata(pdev->dev.parent); 153 struct wm831x *wm831x = dev_get_drvdata(pdev->dev.parent);
154 struct wm831x_pdata *pdata = wm831x->dev->platform_data; 154 struct wm831x_pdata *pdata = dev_get_platdata(wm831x->dev);
155 struct wm831x_isink *isink; 155 struct wm831x_isink *isink;
156 int id = pdev->id % ARRAY_SIZE(pdata->isink); 156 int id = pdev->id % ARRAY_SIZE(pdata->isink);
157 struct regulator_config config = { }; 157 struct regulator_config config = { };
diff --git a/drivers/regulator/wm831x-ldo.c b/drivers/regulator/wm831x-ldo.c
index 76792c7d86f3..1432b26ef2e9 100644
--- a/drivers/regulator/wm831x-ldo.c
+++ b/drivers/regulator/wm831x-ldo.c
@@ -221,7 +221,7 @@ static struct regulator_ops wm831x_gp_ldo_ops = {
221static int wm831x_gp_ldo_probe(struct platform_device *pdev) 221static int wm831x_gp_ldo_probe(struct platform_device *pdev)
222{ 222{
223 struct wm831x *wm831x = dev_get_drvdata(pdev->dev.parent); 223 struct wm831x *wm831x = dev_get_drvdata(pdev->dev.parent);
224 struct wm831x_pdata *pdata = wm831x->dev->platform_data; 224 struct wm831x_pdata *pdata = dev_get_platdata(wm831x->dev);
225 struct regulator_config config = { }; 225 struct regulator_config config = { };
226 int id; 226 int id;
227 struct wm831x_ldo *ldo; 227 struct wm831x_ldo *ldo;
@@ -447,7 +447,7 @@ static struct regulator_ops wm831x_aldo_ops = {
447static int wm831x_aldo_probe(struct platform_device *pdev) 447static int wm831x_aldo_probe(struct platform_device *pdev)
448{ 448{
449 struct wm831x *wm831x = dev_get_drvdata(pdev->dev.parent); 449 struct wm831x *wm831x = dev_get_drvdata(pdev->dev.parent);
450 struct wm831x_pdata *pdata = wm831x->dev->platform_data; 450 struct wm831x_pdata *pdata = dev_get_platdata(wm831x->dev);
451 struct regulator_config config = { }; 451 struct regulator_config config = { };
452 int id; 452 int id;
453 struct wm831x_ldo *ldo; 453 struct wm831x_ldo *ldo;
@@ -605,7 +605,7 @@ static struct regulator_ops wm831x_alive_ldo_ops = {
605static int wm831x_alive_ldo_probe(struct platform_device *pdev) 605static int wm831x_alive_ldo_probe(struct platform_device *pdev)
606{ 606{
607 struct wm831x *wm831x = dev_get_drvdata(pdev->dev.parent); 607 struct wm831x *wm831x = dev_get_drvdata(pdev->dev.parent);
608 struct wm831x_pdata *pdata = wm831x->dev->platform_data; 608 struct wm831x_pdata *pdata = dev_get_platdata(wm831x->dev);
609 struct regulator_config config = { }; 609 struct regulator_config config = { };
610 int id; 610 int id;
611 struct wm831x_ldo *ldo; 611 struct wm831x_ldo *ldo;
diff --git a/drivers/regulator/wm8350-regulator.c b/drivers/regulator/wm8350-regulator.c
index 5453dd0105ed..835b5f0f344e 100644
--- a/drivers/regulator/wm8350-regulator.c
+++ b/drivers/regulator/wm8350-regulator.c
@@ -1201,7 +1201,7 @@ static int wm8350_regulator_probe(struct platform_device *pdev)
1201 } 1201 }
1202 1202
1203 config.dev = &pdev->dev; 1203 config.dev = &pdev->dev;
1204 config.init_data = pdev->dev.platform_data; 1204 config.init_data = dev_get_platdata(&pdev->dev);
1205 config.driver_data = dev_get_drvdata(&pdev->dev); 1205 config.driver_data = dev_get_drvdata(&pdev->dev);
1206 config.regmap = wm8350->regmap; 1206 config.regmap = wm8350->regmap;
1207 1207
diff --git a/drivers/regulator/wm8400-regulator.c b/drivers/regulator/wm8400-regulator.c
index 2ac7e1aceb05..58f51bec13f2 100644
--- a/drivers/regulator/wm8400-regulator.c
+++ b/drivers/regulator/wm8400-regulator.c
@@ -215,7 +215,7 @@ static int wm8400_regulator_probe(struct platform_device *pdev)
215 struct regulator_dev *rdev; 215 struct regulator_dev *rdev;
216 216
217 config.dev = &pdev->dev; 217 config.dev = &pdev->dev;
218 config.init_data = pdev->dev.platform_data; 218 config.init_data = dev_get_platdata(&pdev->dev);
219 config.driver_data = wm8400; 219 config.driver_data = wm8400;
220 config.regmap = wm8400->regmap; 220 config.regmap = wm8400->regmap;
221 221
diff --git a/drivers/regulator/wm8994-regulator.c b/drivers/regulator/wm8994-regulator.c
index 8f2a8a7a3f99..5ee2a208457c 100644
--- a/drivers/regulator/wm8994-regulator.c
+++ b/drivers/regulator/wm8994-regulator.c
@@ -125,7 +125,7 @@ static const struct regulator_init_data wm8994_ldo_default[] = {
125static int wm8994_ldo_probe(struct platform_device *pdev) 125static int wm8994_ldo_probe(struct platform_device *pdev)
126{ 126{
127 struct wm8994 *wm8994 = dev_get_drvdata(pdev->dev.parent); 127 struct wm8994 *wm8994 = dev_get_drvdata(pdev->dev.parent);
128 struct wm8994_pdata *pdata = wm8994->dev->platform_data; 128 struct wm8994_pdata *pdata = dev_get_platdata(wm8994->dev);
129 int id = pdev->id % ARRAY_SIZE(pdata->ldo); 129 int id = pdev->id % ARRAY_SIZE(pdata->ldo);
130 struct regulator_config config = { }; 130 struct regulator_config config = { };
131 struct wm8994_ldo *ldo; 131 struct wm8994_ldo *ldo;