diff options
author | Jingoo Han <jg1.han@samsung.com> | 2013-07-30 04:10:05 -0400 |
---|---|---|
committer | Lee Jones <lee.jones@linaro.org> | 2013-07-31 08:01:29 -0400 |
commit | 334a41ce9b753ec615e8c6c50ee07d6197190610 (patch) | |
tree | a56c8e04be30b8839ba11179ceffaad0b0bb8bc2 /drivers | |
parent | 3e4f8789946de61c61ce6a373d069d55725d956c (diff) |
mfd: Use dev_get_platdata()
Use the wrapper function for retrieving the platform data instead of
accessing dev->platform_data directly.
Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Diffstat (limited to 'drivers')
58 files changed, 89 insertions, 88 deletions
diff --git a/drivers/mfd/88pm800.c b/drivers/mfd/88pm800.c index 6c954835d61e..cd9e17471232 100644 --- a/drivers/mfd/88pm800.c +++ b/drivers/mfd/88pm800.c | |||
@@ -541,7 +541,7 @@ static int pm800_probe(struct i2c_client *client, | |||
541 | { | 541 | { |
542 | int ret = 0; | 542 | int ret = 0; |
543 | struct pm80x_chip *chip; | 543 | struct pm80x_chip *chip; |
544 | struct pm80x_platform_data *pdata = client->dev.platform_data; | 544 | struct pm80x_platform_data *pdata = dev_get_platdata(&client->dev); |
545 | struct pm80x_subchip *subchip; | 545 | struct pm80x_subchip *subchip; |
546 | 546 | ||
547 | ret = pm80x_init(client); | 547 | ret = pm80x_init(client); |
diff --git a/drivers/mfd/88pm805.c b/drivers/mfd/88pm805.c index 521602231c7b..0686cdb06b3e 100644 --- a/drivers/mfd/88pm805.c +++ b/drivers/mfd/88pm805.c | |||
@@ -227,7 +227,7 @@ static int pm805_probe(struct i2c_client *client, | |||
227 | { | 227 | { |
228 | int ret = 0; | 228 | int ret = 0; |
229 | struct pm80x_chip *chip; | 229 | struct pm80x_chip *chip; |
230 | struct pm80x_platform_data *pdata = client->dev.platform_data; | 230 | struct pm80x_platform_data *pdata = dev_get_platdata(&client->dev); |
231 | 231 | ||
232 | ret = pm80x_init(client); | 232 | ret = pm80x_init(client); |
233 | if (ret) { | 233 | if (ret) { |
diff --git a/drivers/mfd/88pm860x-core.c b/drivers/mfd/88pm860x-core.c index eeb481d426b5..7ebe9ef1eba6 100644 --- a/drivers/mfd/88pm860x-core.c +++ b/drivers/mfd/88pm860x-core.c | |||
@@ -1130,7 +1130,7 @@ static int pm860x_dt_init(struct device_node *np, | |||
1130 | static int pm860x_probe(struct i2c_client *client, | 1130 | static int pm860x_probe(struct i2c_client *client, |
1131 | const struct i2c_device_id *id) | 1131 | const struct i2c_device_id *id) |
1132 | { | 1132 | { |
1133 | struct pm860x_platform_data *pdata = client->dev.platform_data; | 1133 | struct pm860x_platform_data *pdata = dev_get_platdata(&client->dev); |
1134 | struct device_node *node = client->dev.of_node; | 1134 | struct device_node *node = client->dev.of_node; |
1135 | struct pm860x_chip *chip; | 1135 | struct pm860x_chip *chip; |
1136 | int ret; | 1136 | int ret; |
diff --git a/drivers/mfd/aat2870-core.c b/drivers/mfd/aat2870-core.c index d4f594517521..6f68472e0ca6 100644 --- a/drivers/mfd/aat2870-core.c +++ b/drivers/mfd/aat2870-core.c | |||
@@ -363,7 +363,7 @@ static inline void aat2870_uninit_debugfs(struct aat2870_data *aat2870) | |||
363 | static int aat2870_i2c_probe(struct i2c_client *client, | 363 | static int aat2870_i2c_probe(struct i2c_client *client, |
364 | const struct i2c_device_id *id) | 364 | const struct i2c_device_id *id) |
365 | { | 365 | { |
366 | struct aat2870_platform_data *pdata = client->dev.platform_data; | 366 | struct aat2870_platform_data *pdata = dev_get_platdata(&client->dev); |
367 | struct aat2870_data *aat2870; | 367 | struct aat2870_data *aat2870; |
368 | int i, j; | 368 | int i, j; |
369 | int ret = 0; | 369 | int ret = 0; |
diff --git a/drivers/mfd/ab3100-core.c b/drivers/mfd/ab3100-core.c index ddc669d19530..b348ae520629 100644 --- a/drivers/mfd/ab3100-core.c +++ b/drivers/mfd/ab3100-core.c | |||
@@ -854,7 +854,7 @@ static int ab3100_probe(struct i2c_client *client, | |||
854 | { | 854 | { |
855 | struct ab3100 *ab3100; | 855 | struct ab3100 *ab3100; |
856 | struct ab3100_platform_data *ab3100_plf_data = | 856 | struct ab3100_platform_data *ab3100_plf_data = |
857 | client->dev.platform_data; | 857 | dev_get_platdata(&client->dev); |
858 | int err; | 858 | int err; |
859 | int i; | 859 | int i; |
860 | 860 | ||
diff --git a/drivers/mfd/adp5520.c b/drivers/mfd/adp5520.c index 28346ad0b4a6..62501553d63c 100644 --- a/drivers/mfd/adp5520.c +++ b/drivers/mfd/adp5520.c | |||
@@ -207,7 +207,7 @@ static int adp5520_remove_subdevs(struct adp5520_chip *chip) | |||
207 | static int adp5520_probe(struct i2c_client *client, | 207 | static int adp5520_probe(struct i2c_client *client, |
208 | const struct i2c_device_id *id) | 208 | const struct i2c_device_id *id) |
209 | { | 209 | { |
210 | struct adp5520_platform_data *pdata = client->dev.platform_data; | 210 | struct adp5520_platform_data *pdata = dev_get_platdata(&client->dev); |
211 | struct platform_device *pdev; | 211 | struct platform_device *pdev; |
212 | struct adp5520_chip *chip; | 212 | struct adp5520_chip *chip; |
213 | int ret; | 213 | int ret; |
diff --git a/drivers/mfd/as3711.c b/drivers/mfd/as3711.c index 01e414162702..abd3ab7c0908 100644 --- a/drivers/mfd/as3711.c +++ b/drivers/mfd/as3711.c | |||
@@ -129,7 +129,7 @@ static int as3711_i2c_probe(struct i2c_client *client, | |||
129 | int ret; | 129 | int ret; |
130 | 130 | ||
131 | if (!client->dev.of_node) { | 131 | if (!client->dev.of_node) { |
132 | pdata = client->dev.platform_data; | 132 | pdata = dev_get_platdata(&client->dev); |
133 | if (!pdata) | 133 | if (!pdata) |
134 | dev_dbg(&client->dev, "Platform data not found\n"); | 134 | dev_dbg(&client->dev, "Platform data not found\n"); |
135 | } else { | 135 | } else { |
diff --git a/drivers/mfd/asic3.c b/drivers/mfd/asic3.c index 9532f749412f..fa22154c84e4 100644 --- a/drivers/mfd/asic3.c +++ b/drivers/mfd/asic3.c | |||
@@ -952,7 +952,7 @@ static void asic3_mfd_remove(struct platform_device *pdev) | |||
952 | /* Core */ | 952 | /* Core */ |
953 | static int __init asic3_probe(struct platform_device *pdev) | 953 | static int __init asic3_probe(struct platform_device *pdev) |
954 | { | 954 | { |
955 | struct asic3_platform_data *pdata = pdev->dev.platform_data; | 955 | struct asic3_platform_data *pdata = dev_get_platdata(&pdev->dev); |
956 | struct asic3 *asic; | 956 | struct asic3 *asic; |
957 | struct resource *mem; | 957 | struct resource *mem; |
958 | unsigned long clksel; | 958 | unsigned long clksel; |
diff --git a/drivers/mfd/da903x.c b/drivers/mfd/da903x.c index f1a316e0d6a6..e0a2e0ee603b 100644 --- a/drivers/mfd/da903x.c +++ b/drivers/mfd/da903x.c | |||
@@ -494,7 +494,7 @@ failed: | |||
494 | static int da903x_probe(struct i2c_client *client, | 494 | static int da903x_probe(struct i2c_client *client, |
495 | const struct i2c_device_id *id) | 495 | const struct i2c_device_id *id) |
496 | { | 496 | { |
497 | struct da903x_platform_data *pdata = client->dev.platform_data; | 497 | struct da903x_platform_data *pdata = dev_get_platdata(&client->dev); |
498 | struct da903x_chip *chip; | 498 | struct da903x_chip *chip; |
499 | unsigned int tmp; | 499 | unsigned int tmp; |
500 | int ret; | 500 | int ret; |
diff --git a/drivers/mfd/da9052-core.c b/drivers/mfd/da9052-core.c index a3c9613f9166..ea28a33576e4 100644 --- a/drivers/mfd/da9052-core.c +++ b/drivers/mfd/da9052-core.c | |||
@@ -534,7 +534,7 @@ EXPORT_SYMBOL_GPL(da9052_regmap_config); | |||
534 | 534 | ||
535 | int da9052_device_init(struct da9052 *da9052, u8 chip_id) | 535 | int da9052_device_init(struct da9052 *da9052, u8 chip_id) |
536 | { | 536 | { |
537 | struct da9052_pdata *pdata = da9052->dev->platform_data; | 537 | struct da9052_pdata *pdata = dev_get_platdata(da9052->dev); |
538 | int ret; | 538 | int ret; |
539 | 539 | ||
540 | mutex_init(&da9052->auxadc_lock); | 540 | mutex_init(&da9052->auxadc_lock); |
diff --git a/drivers/mfd/da9055-core.c b/drivers/mfd/da9055-core.c index e4c0596723ab..d3670cd3c3c6 100644 --- a/drivers/mfd/da9055-core.c +++ b/drivers/mfd/da9055-core.c | |||
@@ -379,7 +379,7 @@ static struct regmap_irq_chip da9055_regmap_irq_chip = { | |||
379 | 379 | ||
380 | int da9055_device_init(struct da9055 *da9055) | 380 | int da9055_device_init(struct da9055 *da9055) |
381 | { | 381 | { |
382 | struct da9055_pdata *pdata = da9055->dev->platform_data; | 382 | struct da9055_pdata *pdata = dev_get_platdata(da9055->dev); |
383 | int ret; | 383 | int ret; |
384 | uint8_t clear_events[3] = {0xFF, 0xFF, 0xFF}; | 384 | uint8_t clear_events[3] = {0xFF, 0xFF, 0xFF}; |
385 | 385 | ||
diff --git a/drivers/mfd/dm355evm_msp.c b/drivers/mfd/dm355evm_msp.c index 7710227d284e..7a55c0071fa8 100644 --- a/drivers/mfd/dm355evm_msp.c +++ b/drivers/mfd/dm355evm_msp.c | |||
@@ -315,8 +315,8 @@ static int add_children(struct i2c_client *client) | |||
315 | } | 315 | } |
316 | 316 | ||
317 | /* MMC/SD inputs -- right after the last config input */ | 317 | /* MMC/SD inputs -- right after the last config input */ |
318 | if (client->dev.platform_data) { | 318 | if (dev_get_platdata(&client->dev)) { |
319 | void (*mmcsd_setup)(unsigned) = client->dev.platform_data; | 319 | void (*mmcsd_setup)(unsigned) = dev_get_platdata(&client->dev); |
320 | 320 | ||
321 | mmcsd_setup(dm355evm_msp_gpio.base + 8 + 5); | 321 | mmcsd_setup(dm355evm_msp_gpio.base + 8 + 5); |
322 | } | 322 | } |
diff --git a/drivers/mfd/ezx-pcap.c b/drivers/mfd/ezx-pcap.c index 5502106ad515..7245b0c5b794 100644 --- a/drivers/mfd/ezx-pcap.c +++ b/drivers/mfd/ezx-pcap.c | |||
@@ -177,7 +177,7 @@ static void pcap_msr_work(struct work_struct *work) | |||
177 | static void pcap_isr_work(struct work_struct *work) | 177 | static void pcap_isr_work(struct work_struct *work) |
178 | { | 178 | { |
179 | struct pcap_chip *pcap = container_of(work, struct pcap_chip, isr_work); | 179 | struct pcap_chip *pcap = container_of(work, struct pcap_chip, isr_work); |
180 | struct pcap_platform_data *pdata = pcap->spi->dev.platform_data; | 180 | struct pcap_platform_data *pdata = dev_get_platdata(&pcap->spi->dev); |
181 | u32 msr, isr, int_sel, service; | 181 | u32 msr, isr, int_sel, service; |
182 | int irq; | 182 | int irq; |
183 | 183 | ||
@@ -394,7 +394,7 @@ static int pcap_add_subdev(struct pcap_chip *pcap, | |||
394 | static int ezx_pcap_remove(struct spi_device *spi) | 394 | static int ezx_pcap_remove(struct spi_device *spi) |
395 | { | 395 | { |
396 | struct pcap_chip *pcap = spi_get_drvdata(spi); | 396 | struct pcap_chip *pcap = spi_get_drvdata(spi); |
397 | struct pcap_platform_data *pdata = spi->dev.platform_data; | 397 | struct pcap_platform_data *pdata = dev_get_platdata(&spi->dev); |
398 | int i, adc_irq; | 398 | int i, adc_irq; |
399 | 399 | ||
400 | /* remove all registered subdevs */ | 400 | /* remove all registered subdevs */ |
@@ -420,7 +420,7 @@ static int ezx_pcap_remove(struct spi_device *spi) | |||
420 | 420 | ||
421 | static int ezx_pcap_probe(struct spi_device *spi) | 421 | static int ezx_pcap_probe(struct spi_device *spi) |
422 | { | 422 | { |
423 | struct pcap_platform_data *pdata = spi->dev.platform_data; | 423 | struct pcap_platform_data *pdata = dev_get_platdata(&spi->dev); |
424 | struct pcap_chip *pcap; | 424 | struct pcap_chip *pcap; |
425 | int i, adc_irq; | 425 | int i, adc_irq; |
426 | int ret = -ENODEV; | 426 | int ret = -ENODEV; |
diff --git a/drivers/mfd/htc-egpio.c b/drivers/mfd/htc-egpio.c index 26aca545084b..49f39feca784 100644 --- a/drivers/mfd/htc-egpio.c +++ b/drivers/mfd/htc-egpio.c | |||
@@ -261,7 +261,7 @@ static void egpio_write_cache(struct egpio_info *ei) | |||
261 | 261 | ||
262 | static int __init egpio_probe(struct platform_device *pdev) | 262 | static int __init egpio_probe(struct platform_device *pdev) |
263 | { | 263 | { |
264 | struct htc_egpio_platform_data *pdata = pdev->dev.platform_data; | 264 | struct htc_egpio_platform_data *pdata = dev_get_platdata(&pdev->dev); |
265 | struct resource *res; | 265 | struct resource *res; |
266 | struct egpio_info *ei; | 266 | struct egpio_info *ei; |
267 | struct gpio_chip *chip; | 267 | struct gpio_chip *chip; |
diff --git a/drivers/mfd/htc-i2cpld.c b/drivers/mfd/htc-i2cpld.c index c9dfce6ae0c2..d7b2a75aca3e 100644 --- a/drivers/mfd/htc-i2cpld.c +++ b/drivers/mfd/htc-i2cpld.c | |||
@@ -340,7 +340,7 @@ static int htcpld_setup_chip_irq( | |||
340 | int ret = 0; | 340 | int ret = 0; |
341 | 341 | ||
342 | /* Get the platform and driver data */ | 342 | /* Get the platform and driver data */ |
343 | pdata = dev->platform_data; | 343 | pdata = dev_get_platdata(dev); |
344 | htcpld = platform_get_drvdata(pdev); | 344 | htcpld = platform_get_drvdata(pdev); |
345 | chip = &htcpld->chip[chip_index]; | 345 | chip = &htcpld->chip[chip_index]; |
346 | plat_chip_data = &pdata->chip[chip_index]; | 346 | plat_chip_data = &pdata->chip[chip_index]; |
@@ -375,7 +375,7 @@ static int htcpld_register_chip_i2c( | |||
375 | struct i2c_board_info info; | 375 | struct i2c_board_info info; |
376 | 376 | ||
377 | /* Get the platform and driver data */ | 377 | /* Get the platform and driver data */ |
378 | pdata = dev->platform_data; | 378 | pdata = dev_get_platdata(dev); |
379 | htcpld = platform_get_drvdata(pdev); | 379 | htcpld = platform_get_drvdata(pdev); |
380 | chip = &htcpld->chip[chip_index]; | 380 | chip = &htcpld->chip[chip_index]; |
381 | plat_chip_data = &pdata->chip[chip_index]; | 381 | plat_chip_data = &pdata->chip[chip_index]; |
@@ -447,7 +447,7 @@ static int htcpld_register_chip_gpio( | |||
447 | int ret = 0; | 447 | int ret = 0; |
448 | 448 | ||
449 | /* Get the platform and driver data */ | 449 | /* Get the platform and driver data */ |
450 | pdata = dev->platform_data; | 450 | pdata = dev_get_platdata(dev); |
451 | htcpld = platform_get_drvdata(pdev); | 451 | htcpld = platform_get_drvdata(pdev); |
452 | chip = &htcpld->chip[chip_index]; | 452 | chip = &htcpld->chip[chip_index]; |
453 | plat_chip_data = &pdata->chip[chip_index]; | 453 | plat_chip_data = &pdata->chip[chip_index]; |
@@ -509,7 +509,7 @@ static int htcpld_setup_chips(struct platform_device *pdev) | |||
509 | int i; | 509 | int i; |
510 | 510 | ||
511 | /* Get the platform and driver data */ | 511 | /* Get the platform and driver data */ |
512 | pdata = dev->platform_data; | 512 | pdata = dev_get_platdata(dev); |
513 | htcpld = platform_get_drvdata(pdev); | 513 | htcpld = platform_get_drvdata(pdev); |
514 | 514 | ||
515 | /* Setup each chip's output GPIOs */ | 515 | /* Setup each chip's output GPIOs */ |
@@ -574,7 +574,7 @@ static int htcpld_core_probe(struct platform_device *pdev) | |||
574 | if (!dev) | 574 | if (!dev) |
575 | return -ENODEV; | 575 | return -ENODEV; |
576 | 576 | ||
577 | pdata = dev->platform_data; | 577 | pdata = dev_get_platdata(dev); |
578 | if (!pdata) { | 578 | if (!pdata) { |
579 | dev_warn(dev, "Platform data not found for htcpld core!\n"); | 579 | dev_warn(dev, "Platform data not found for htcpld core!\n"); |
580 | return -ENXIO; | 580 | return -ENXIO; |
diff --git a/drivers/mfd/htc-pasic3.c b/drivers/mfd/htc-pasic3.c index 0a5e85fd8517..6bf92a507b95 100644 --- a/drivers/mfd/htc-pasic3.c +++ b/drivers/mfd/htc-pasic3.c | |||
@@ -126,7 +126,7 @@ static struct mfd_cell ds1wm_cell __initdata = { | |||
126 | 126 | ||
127 | static int __init pasic3_probe(struct platform_device *pdev) | 127 | static int __init pasic3_probe(struct platform_device *pdev) |
128 | { | 128 | { |
129 | struct pasic3_platform_data *pdata = pdev->dev.platform_data; | 129 | struct pasic3_platform_data *pdata = dev_get_platdata(&pdev->dev); |
130 | struct device *dev = &pdev->dev; | 130 | struct device *dev = &pdev->dev; |
131 | struct pasic3_data *asic; | 131 | struct pasic3_data *asic; |
132 | struct resource *r; | 132 | struct resource *r; |
diff --git a/drivers/mfd/intel_msic.c b/drivers/mfd/intel_msic.c index 4f2462f0963e..9203d47cdbb1 100644 --- a/drivers/mfd/intel_msic.c +++ b/drivers/mfd/intel_msic.c | |||
@@ -310,7 +310,7 @@ EXPORT_SYMBOL_GPL(intel_msic_irq_read); | |||
310 | static int intel_msic_init_devices(struct intel_msic *msic) | 310 | static int intel_msic_init_devices(struct intel_msic *msic) |
311 | { | 311 | { |
312 | struct platform_device *pdev = msic->pdev; | 312 | struct platform_device *pdev = msic->pdev; |
313 | struct intel_msic_platform_data *pdata = pdev->dev.platform_data; | 313 | struct intel_msic_platform_data *pdata = dev_get_platdata(&pdev->dev); |
314 | int ret, i; | 314 | int ret, i; |
315 | 315 | ||
316 | if (pdata->gpio) { | 316 | if (pdata->gpio) { |
@@ -372,7 +372,7 @@ static void intel_msic_remove_devices(struct intel_msic *msic) | |||
372 | 372 | ||
373 | static int intel_msic_probe(struct platform_device *pdev) | 373 | static int intel_msic_probe(struct platform_device *pdev) |
374 | { | 374 | { |
375 | struct intel_msic_platform_data *pdata = pdev->dev.platform_data; | 375 | struct intel_msic_platform_data *pdata = dev_get_platdata(&pdev->dev); |
376 | struct intel_msic *msic; | 376 | struct intel_msic *msic; |
377 | struct resource *res; | 377 | struct resource *res; |
378 | u8 id0, id1; | 378 | u8 id0, id1; |
diff --git a/drivers/mfd/kempld-core.c b/drivers/mfd/kempld-core.c index 686a4565acb6..ab36e6ebbf8b 100644 --- a/drivers/mfd/kempld-core.c +++ b/drivers/mfd/kempld-core.c | |||
@@ -258,7 +258,7 @@ EXPORT_SYMBOL_GPL(kempld_write32); | |||
258 | */ | 258 | */ |
259 | void kempld_get_mutex(struct kempld_device_data *pld) | 259 | void kempld_get_mutex(struct kempld_device_data *pld) |
260 | { | 260 | { |
261 | struct kempld_platform_data *pdata = pld->dev->platform_data; | 261 | struct kempld_platform_data *pdata = dev_get_platdata(pld->dev); |
262 | 262 | ||
263 | mutex_lock(&pld->lock); | 263 | mutex_lock(&pld->lock); |
264 | pdata->get_hardware_mutex(pld); | 264 | pdata->get_hardware_mutex(pld); |
@@ -271,7 +271,7 @@ EXPORT_SYMBOL_GPL(kempld_get_mutex); | |||
271 | */ | 271 | */ |
272 | void kempld_release_mutex(struct kempld_device_data *pld) | 272 | void kempld_release_mutex(struct kempld_device_data *pld) |
273 | { | 273 | { |
274 | struct kempld_platform_data *pdata = pld->dev->platform_data; | 274 | struct kempld_platform_data *pdata = dev_get_platdata(pld->dev); |
275 | 275 | ||
276 | pdata->release_hardware_mutex(pld); | 276 | pdata->release_hardware_mutex(pld); |
277 | mutex_unlock(&pld->lock); | 277 | mutex_unlock(&pld->lock); |
@@ -288,7 +288,7 @@ EXPORT_SYMBOL_GPL(kempld_release_mutex); | |||
288 | */ | 288 | */ |
289 | static int kempld_get_info(struct kempld_device_data *pld) | 289 | static int kempld_get_info(struct kempld_device_data *pld) |
290 | { | 290 | { |
291 | struct kempld_platform_data *pdata = pld->dev->platform_data; | 291 | struct kempld_platform_data *pdata = dev_get_platdata(pld->dev); |
292 | 292 | ||
293 | return pdata->get_info(pld); | 293 | return pdata->get_info(pld); |
294 | } | 294 | } |
@@ -302,7 +302,7 @@ static int kempld_get_info(struct kempld_device_data *pld) | |||
302 | */ | 302 | */ |
303 | static int kempld_register_cells(struct kempld_device_data *pld) | 303 | static int kempld_register_cells(struct kempld_device_data *pld) |
304 | { | 304 | { |
305 | struct kempld_platform_data *pdata = pld->dev->platform_data; | 305 | struct kempld_platform_data *pdata = dev_get_platdata(pld->dev); |
306 | 306 | ||
307 | return pdata->register_cells(pld); | 307 | return pdata->register_cells(pld); |
308 | } | 308 | } |
@@ -357,7 +357,7 @@ static int kempld_detect_device(struct kempld_device_data *pld) | |||
357 | 357 | ||
358 | static int kempld_probe(struct platform_device *pdev) | 358 | static int kempld_probe(struct platform_device *pdev) |
359 | { | 359 | { |
360 | struct kempld_platform_data *pdata = pdev->dev.platform_data; | 360 | struct kempld_platform_data *pdata = dev_get_platdata(&pdev->dev); |
361 | struct device *dev = &pdev->dev; | 361 | struct device *dev = &pdev->dev; |
362 | struct kempld_device_data *pld; | 362 | struct kempld_device_data *pld; |
363 | struct resource *ioport; | 363 | struct resource *ioport; |
@@ -394,7 +394,7 @@ static int kempld_probe(struct platform_device *pdev) | |||
394 | static int kempld_remove(struct platform_device *pdev) | 394 | static int kempld_remove(struct platform_device *pdev) |
395 | { | 395 | { |
396 | struct kempld_device_data *pld = platform_get_drvdata(pdev); | 396 | struct kempld_device_data *pld = platform_get_drvdata(pdev); |
397 | struct kempld_platform_data *pdata = pld->dev->platform_data; | 397 | struct kempld_platform_data *pdata = dev_get_platdata(pld->dev); |
398 | 398 | ||
399 | mfd_remove_devices(&pdev->dev); | 399 | mfd_remove_devices(&pdev->dev); |
400 | pdata->release_hardware_mutex(pld); | 400 | pdata->release_hardware_mutex(pld); |
diff --git a/drivers/mfd/lm3533-core.c b/drivers/mfd/lm3533-core.c index 4b7e6dac1de8..8c29f7b27324 100644 --- a/drivers/mfd/lm3533-core.c +++ b/drivers/mfd/lm3533-core.c | |||
@@ -384,7 +384,7 @@ static struct attribute_group lm3533_attribute_group = { | |||
384 | 384 | ||
385 | static int lm3533_device_als_init(struct lm3533 *lm3533) | 385 | static int lm3533_device_als_init(struct lm3533 *lm3533) |
386 | { | 386 | { |
387 | struct lm3533_platform_data *pdata = lm3533->dev->platform_data; | 387 | struct lm3533_platform_data *pdata = dev_get_platdata(lm3533->dev); |
388 | int ret; | 388 | int ret; |
389 | 389 | ||
390 | if (!pdata->als) | 390 | if (!pdata->als) |
@@ -407,7 +407,7 @@ static int lm3533_device_als_init(struct lm3533 *lm3533) | |||
407 | 407 | ||
408 | static int lm3533_device_bl_init(struct lm3533 *lm3533) | 408 | static int lm3533_device_bl_init(struct lm3533 *lm3533) |
409 | { | 409 | { |
410 | struct lm3533_platform_data *pdata = lm3533->dev->platform_data; | 410 | struct lm3533_platform_data *pdata = dev_get_platdata(lm3533->dev); |
411 | int i; | 411 | int i; |
412 | int ret; | 412 | int ret; |
413 | 413 | ||
@@ -436,7 +436,7 @@ static int lm3533_device_bl_init(struct lm3533 *lm3533) | |||
436 | 436 | ||
437 | static int lm3533_device_led_init(struct lm3533 *lm3533) | 437 | static int lm3533_device_led_init(struct lm3533 *lm3533) |
438 | { | 438 | { |
439 | struct lm3533_platform_data *pdata = lm3533->dev->platform_data; | 439 | struct lm3533_platform_data *pdata = dev_get_platdata(lm3533->dev); |
440 | int i; | 440 | int i; |
441 | int ret; | 441 | int ret; |
442 | 442 | ||
@@ -481,7 +481,7 @@ static int lm3533_device_setup(struct lm3533 *lm3533, | |||
481 | 481 | ||
482 | static int lm3533_device_init(struct lm3533 *lm3533) | 482 | static int lm3533_device_init(struct lm3533 *lm3533) |
483 | { | 483 | { |
484 | struct lm3533_platform_data *pdata = lm3533->dev->platform_data; | 484 | struct lm3533_platform_data *pdata = dev_get_platdata(lm3533->dev); |
485 | int ret; | 485 | int ret; |
486 | 486 | ||
487 | dev_dbg(lm3533->dev, "%s\n", __func__); | 487 | dev_dbg(lm3533->dev, "%s\n", __func__); |
diff --git a/drivers/mfd/lp8788.c b/drivers/mfd/lp8788.c index c3d3c9b4d3ad..0f1221911018 100644 --- a/drivers/mfd/lp8788.c +++ b/drivers/mfd/lp8788.c | |||
@@ -173,7 +173,7 @@ static const struct regmap_config lp8788_regmap_config = { | |||
173 | static int lp8788_probe(struct i2c_client *cl, const struct i2c_device_id *id) | 173 | static int lp8788_probe(struct i2c_client *cl, const struct i2c_device_id *id) |
174 | { | 174 | { |
175 | struct lp8788 *lp; | 175 | struct lp8788 *lp; |
176 | struct lp8788_platform_data *pdata = cl->dev.platform_data; | 176 | struct lp8788_platform_data *pdata = dev_get_platdata(&cl->dev); |
177 | int ret; | 177 | int ret; |
178 | 178 | ||
179 | lp = devm_kzalloc(&cl->dev, sizeof(struct lp8788), GFP_KERNEL); | 179 | lp = devm_kzalloc(&cl->dev, sizeof(struct lp8788), GFP_KERNEL); |
diff --git a/drivers/mfd/max77686.c b/drivers/mfd/max77686.c index f27a21831583..522be67b2e68 100644 --- a/drivers/mfd/max77686.c +++ b/drivers/mfd/max77686.c | |||
@@ -77,7 +77,7 @@ static int max77686_i2c_probe(struct i2c_client *i2c, | |||
77 | const struct i2c_device_id *id) | 77 | const struct i2c_device_id *id) |
78 | { | 78 | { |
79 | struct max77686_dev *max77686 = NULL; | 79 | struct max77686_dev *max77686 = NULL; |
80 | struct max77686_platform_data *pdata = i2c->dev.platform_data; | 80 | struct max77686_platform_data *pdata = dev_get_platdata(&i2c->dev); |
81 | unsigned int data; | 81 | unsigned int data; |
82 | int ret = 0; | 82 | int ret = 0; |
83 | 83 | ||
diff --git a/drivers/mfd/max77693.c b/drivers/mfd/max77693.c index 9e60fed5ff82..c04723efc707 100644 --- a/drivers/mfd/max77693.c +++ b/drivers/mfd/max77693.c | |||
@@ -110,7 +110,7 @@ static int max77693_i2c_probe(struct i2c_client *i2c, | |||
110 | const struct i2c_device_id *id) | 110 | const struct i2c_device_id *id) |
111 | { | 111 | { |
112 | struct max77693_dev *max77693; | 112 | struct max77693_dev *max77693; |
113 | struct max77693_platform_data *pdata = i2c->dev.platform_data; | 113 | struct max77693_platform_data *pdata = dev_get_platdata(&i2c->dev); |
114 | u8 reg_data; | 114 | u8 reg_data; |
115 | int ret = 0; | 115 | int ret = 0; |
116 | 116 | ||
diff --git a/drivers/mfd/max8925-i2c.c b/drivers/mfd/max8925-i2c.c index 8042b3205eaa..de7fb80a6052 100644 --- a/drivers/mfd/max8925-i2c.c +++ b/drivers/mfd/max8925-i2c.c | |||
@@ -151,7 +151,7 @@ static int max8925_dt_init(struct device_node *np, struct device *dev, | |||
151 | static int max8925_probe(struct i2c_client *client, | 151 | static int max8925_probe(struct i2c_client *client, |
152 | const struct i2c_device_id *id) | 152 | const struct i2c_device_id *id) |
153 | { | 153 | { |
154 | struct max8925_platform_data *pdata = client->dev.platform_data; | 154 | struct max8925_platform_data *pdata = dev_get_platdata(&client->dev); |
155 | static struct max8925_chip *chip; | 155 | static struct max8925_chip *chip; |
156 | struct device_node *node = client->dev.of_node; | 156 | struct device_node *node = client->dev.of_node; |
157 | 157 | ||
diff --git a/drivers/mfd/max8997.c b/drivers/mfd/max8997.c index 14714058f2d2..ae55dd43d09c 100644 --- a/drivers/mfd/max8997.c +++ b/drivers/mfd/max8997.c | |||
@@ -188,7 +188,7 @@ static int max8997_i2c_probe(struct i2c_client *i2c, | |||
188 | const struct i2c_device_id *id) | 188 | const struct i2c_device_id *id) |
189 | { | 189 | { |
190 | struct max8997_dev *max8997; | 190 | struct max8997_dev *max8997; |
191 | struct max8997_platform_data *pdata = i2c->dev.platform_data; | 191 | struct max8997_platform_data *pdata = dev_get_platdata(&i2c->dev); |
192 | int ret = 0; | 192 | int ret = 0; |
193 | 193 | ||
194 | max8997 = kzalloc(sizeof(struct max8997_dev), GFP_KERNEL); | 194 | max8997 = kzalloc(sizeof(struct max8997_dev), GFP_KERNEL); |
diff --git a/drivers/mfd/max8998.c b/drivers/mfd/max8998.c index 21af51a499f4..45bffb8c7236 100644 --- a/drivers/mfd/max8998.c +++ b/drivers/mfd/max8998.c | |||
@@ -184,7 +184,7 @@ static inline int max8998_i2c_get_driver_data(struct i2c_client *i2c, | |||
184 | static int max8998_i2c_probe(struct i2c_client *i2c, | 184 | static int max8998_i2c_probe(struct i2c_client *i2c, |
185 | const struct i2c_device_id *id) | 185 | const struct i2c_device_id *id) |
186 | { | 186 | { |
187 | struct max8998_platform_data *pdata = i2c->dev.platform_data; | 187 | struct max8998_platform_data *pdata = dev_get_platdata(&i2c->dev); |
188 | struct max8998_dev *max8998; | 188 | struct max8998_dev *max8998; |
189 | int ret = 0; | 189 | int ret = 0; |
190 | 190 | ||
diff --git a/drivers/mfd/mcp-sa11x0.c b/drivers/mfd/mcp-sa11x0.c index 13198d937e36..41c31b3ac940 100644 --- a/drivers/mfd/mcp-sa11x0.c +++ b/drivers/mfd/mcp-sa11x0.c | |||
@@ -156,7 +156,7 @@ static struct mcp_ops mcp_sa11x0 = { | |||
156 | 156 | ||
157 | static int mcp_sa11x0_probe(struct platform_device *dev) | 157 | static int mcp_sa11x0_probe(struct platform_device *dev) |
158 | { | 158 | { |
159 | struct mcp_plat_data *data = dev->dev.platform_data; | 159 | struct mcp_plat_data *data = dev_get_platdata(&dev->dev); |
160 | struct resource *mem0, *mem1; | 160 | struct resource *mem0, *mem1; |
161 | struct mcp_sa11x0 *m; | 161 | struct mcp_sa11x0 *m; |
162 | struct mcp *mcp; | 162 | struct mcp *mcp; |
diff --git a/drivers/mfd/menelaus.c b/drivers/mfd/menelaus.c index 998ce8cb3065..9b72a44ab60b 100644 --- a/drivers/mfd/menelaus.c +++ b/drivers/mfd/menelaus.c | |||
@@ -1189,7 +1189,7 @@ static int menelaus_probe(struct i2c_client *client, | |||
1189 | int rev = 0, val; | 1189 | int rev = 0, val; |
1190 | int err = 0; | 1190 | int err = 0; |
1191 | struct menelaus_platform_data *menelaus_pdata = | 1191 | struct menelaus_platform_data *menelaus_pdata = |
1192 | client->dev.platform_data; | 1192 | dev_get_platdata(&client->dev); |
1193 | 1193 | ||
1194 | if (the_menelaus) { | 1194 | if (the_menelaus) { |
1195 | dev_dbg(&client->dev, "only one %s for now\n", | 1195 | dev_dbg(&client->dev, "only one %s for now\n", |
diff --git a/drivers/mfd/omap-usb-host.c b/drivers/mfd/omap-usb-host.c index 759fae3ca7fb..d2b8e7189907 100644 --- a/drivers/mfd/omap-usb-host.c +++ b/drivers/mfd/omap-usb-host.c | |||
@@ -232,7 +232,7 @@ err_end: | |||
232 | static int omap_usbhs_alloc_children(struct platform_device *pdev) | 232 | static int omap_usbhs_alloc_children(struct platform_device *pdev) |
233 | { | 233 | { |
234 | struct device *dev = &pdev->dev; | 234 | struct device *dev = &pdev->dev; |
235 | struct usbhs_omap_platform_data *pdata = dev->platform_data; | 235 | struct usbhs_omap_platform_data *pdata = dev_get_platdata(dev); |
236 | struct platform_device *ehci; | 236 | struct platform_device *ehci; |
237 | struct platform_device *ohci; | 237 | struct platform_device *ohci; |
238 | struct resource *res; | 238 | struct resource *res; |
@@ -571,7 +571,7 @@ static struct of_device_id usbhs_child_match_table[] = { | |||
571 | static int usbhs_omap_probe(struct platform_device *pdev) | 571 | static int usbhs_omap_probe(struct platform_device *pdev) |
572 | { | 572 | { |
573 | struct device *dev = &pdev->dev; | 573 | struct device *dev = &pdev->dev; |
574 | struct usbhs_omap_platform_data *pdata = dev->platform_data; | 574 | struct usbhs_omap_platform_data *pdata = dev_get_platdata(dev); |
575 | struct usbhs_hcd_omap *omap; | 575 | struct usbhs_hcd_omap *omap; |
576 | struct resource *res; | 576 | struct resource *res; |
577 | int ret = 0; | 577 | int ret = 0; |
diff --git a/drivers/mfd/pcf50633-core.c b/drivers/mfd/pcf50633-core.c index d11567307fbe..6841d6805fd6 100644 --- a/drivers/mfd/pcf50633-core.c +++ b/drivers/mfd/pcf50633-core.c | |||
@@ -195,7 +195,7 @@ static int pcf50633_probe(struct i2c_client *client, | |||
195 | const struct i2c_device_id *ids) | 195 | const struct i2c_device_id *ids) |
196 | { | 196 | { |
197 | struct pcf50633 *pcf; | 197 | struct pcf50633 *pcf; |
198 | struct pcf50633_platform_data *pdata = client->dev.platform_data; | 198 | struct pcf50633_platform_data *pdata = dev_get_platdata(&client->dev); |
199 | int i, ret; | 199 | int i, ret; |
200 | int version, variant; | 200 | int version, variant; |
201 | 201 | ||
diff --git a/drivers/mfd/pm8921-core.c b/drivers/mfd/pm8921-core.c index ecc137ffa8c3..9be6840e88ee 100644 --- a/drivers/mfd/pm8921-core.c +++ b/drivers/mfd/pm8921-core.c | |||
@@ -106,7 +106,7 @@ static int pm8921_add_subdevices(const struct pm8921_platform_data | |||
106 | 106 | ||
107 | static int pm8921_probe(struct platform_device *pdev) | 107 | static int pm8921_probe(struct platform_device *pdev) |
108 | { | 108 | { |
109 | const struct pm8921_platform_data *pdata = pdev->dev.platform_data; | 109 | const struct pm8921_platform_data *pdata = dev_get_platdata(&pdev->dev); |
110 | struct pm8921 *pmic; | 110 | struct pm8921 *pmic; |
111 | int rc; | 111 | int rc; |
112 | u8 val; | 112 | u8 val; |
diff --git a/drivers/mfd/rc5t583.c b/drivers/mfd/rc5t583.c index 14bdaccefbec..346330176afc 100644 --- a/drivers/mfd/rc5t583.c +++ b/drivers/mfd/rc5t583.c | |||
@@ -250,7 +250,7 @@ static int rc5t583_i2c_probe(struct i2c_client *i2c, | |||
250 | const struct i2c_device_id *id) | 250 | const struct i2c_device_id *id) |
251 | { | 251 | { |
252 | struct rc5t583 *rc5t583; | 252 | struct rc5t583 *rc5t583; |
253 | struct rc5t583_platform_data *pdata = i2c->dev.platform_data; | 253 | struct rc5t583_platform_data *pdata = dev_get_platdata(&i2c->dev); |
254 | int ret; | 254 | int ret; |
255 | bool irq_init_success = false; | 255 | bool irq_init_success = false; |
256 | 256 | ||
diff --git a/drivers/mfd/sec-core.c b/drivers/mfd/sec-core.c index 79c07502db52..86a7d611f71b 100644 --- a/drivers/mfd/sec-core.c +++ b/drivers/mfd/sec-core.c | |||
@@ -216,7 +216,7 @@ static inline int sec_i2c_get_driver_data(struct i2c_client *i2c, | |||
216 | static int sec_pmic_probe(struct i2c_client *i2c, | 216 | static int sec_pmic_probe(struct i2c_client *i2c, |
217 | const struct i2c_device_id *id) | 217 | const struct i2c_device_id *id) |
218 | { | 218 | { |
219 | struct sec_platform_data *pdata = i2c->dev.platform_data; | 219 | struct sec_platform_data *pdata = dev_get_platdata(&i2c->dev); |
220 | const struct regmap_config *regmap; | 220 | const struct regmap_config *regmap; |
221 | struct sec_pmic_dev *sec_pmic; | 221 | struct sec_pmic_dev *sec_pmic; |
222 | int ret; | 222 | int ret; |
diff --git a/drivers/mfd/si476x-i2c.c b/drivers/mfd/si476x-i2c.c index f5bc8e4bd4bf..0e4a76daf187 100644 --- a/drivers/mfd/si476x-i2c.c +++ b/drivers/mfd/si476x-i2c.c | |||
@@ -718,7 +718,7 @@ static int si476x_core_probe(struct i2c_client *client, | |||
718 | atomic_set(&core->is_alive, 0); | 718 | atomic_set(&core->is_alive, 0); |
719 | core->power_state = SI476X_POWER_DOWN; | 719 | core->power_state = SI476X_POWER_DOWN; |
720 | 720 | ||
721 | pdata = client->dev.platform_data; | 721 | pdata = dev_get_platdata(&client->dev); |
722 | if (pdata) { | 722 | if (pdata) { |
723 | memcpy(&core->power_up_parameters, | 723 | memcpy(&core->power_up_parameters, |
724 | &pdata->power_up_parameters, | 724 | &pdata->power_up_parameters, |
diff --git a/drivers/mfd/sm501.c b/drivers/mfd/sm501.c index 9816c232e583..33f040c558d0 100644 --- a/drivers/mfd/sm501.c +++ b/drivers/mfd/sm501.c | |||
@@ -840,7 +840,7 @@ static int sm501_register_uart(struct sm501_devdata *sm, int devices) | |||
840 | if (!pdev) | 840 | if (!pdev) |
841 | return -ENOMEM; | 841 | return -ENOMEM; |
842 | 842 | ||
843 | uart_data = pdev->dev.platform_data; | 843 | uart_data = dev_get_platdata(&pdev->dev); |
844 | 844 | ||
845 | if (devices & SM501_USE_UART0) { | 845 | if (devices & SM501_USE_UART0) { |
846 | sm501_setup_uart_data(sm, uart_data++, 0x30000); | 846 | sm501_setup_uart_data(sm, uart_data++, 0x30000); |
@@ -1167,7 +1167,7 @@ static int sm501_register_gpio_i2c_instance(struct sm501_devdata *sm, | |||
1167 | if (!pdev) | 1167 | if (!pdev) |
1168 | return -ENOMEM; | 1168 | return -ENOMEM; |
1169 | 1169 | ||
1170 | icd = pdev->dev.platform_data; | 1170 | icd = dev_get_platdata(&pdev->dev); |
1171 | 1171 | ||
1172 | /* We keep the pin_sda and pin_scl fields relative in case the | 1172 | /* We keep the pin_sda and pin_scl fields relative in case the |
1173 | * same platform data is passed to >1 SM501. | 1173 | * same platform data is passed to >1 SM501. |
@@ -1403,7 +1403,7 @@ static int sm501_plat_probe(struct platform_device *dev) | |||
1403 | 1403 | ||
1404 | sm->dev = &dev->dev; | 1404 | sm->dev = &dev->dev; |
1405 | sm->pdev_id = dev->id; | 1405 | sm->pdev_id = dev->id; |
1406 | sm->platdata = dev->dev.platform_data; | 1406 | sm->platdata = dev_get_platdata(&dev->dev); |
1407 | 1407 | ||
1408 | ret = platform_get_irq(dev, 0); | 1408 | ret = platform_get_irq(dev, 0); |
1409 | if (ret < 0) { | 1409 | if (ret < 0) { |
diff --git a/drivers/mfd/sta2x11-mfd.c b/drivers/mfd/sta2x11-mfd.c index d70a343078fd..65c6fa671acb 100644 --- a/drivers/mfd/sta2x11-mfd.c +++ b/drivers/mfd/sta2x11-mfd.c | |||
@@ -133,7 +133,7 @@ int sta2x11_mfd_get_regs_data(struct platform_device *dev, | |||
133 | void __iomem **regs, | 133 | void __iomem **regs, |
134 | spinlock_t **lock) | 134 | spinlock_t **lock) |
135 | { | 135 | { |
136 | struct pci_dev *pdev = *(struct pci_dev **)(dev->dev.platform_data); | 136 | struct pci_dev *pdev = *(struct pci_dev **)dev_get_platdata(&dev->dev); |
137 | struct sta2x11_mfd *mfd; | 137 | struct sta2x11_mfd *mfd; |
138 | 138 | ||
139 | if (!pdev) | 139 | if (!pdev) |
@@ -312,7 +312,7 @@ static int sta2x11_mfd_platform_probe(struct platform_device *dev, | |||
312 | const char *name = sta2x11_mfd_names[index]; | 312 | const char *name = sta2x11_mfd_names[index]; |
313 | struct regmap_config *regmap_config = sta2x11_mfd_regmap_configs[index]; | 313 | struct regmap_config *regmap_config = sta2x11_mfd_regmap_configs[index]; |
314 | 314 | ||
315 | pdev = dev->dev.platform_data; | 315 | pdev = dev_get_platdata(&dev->dev); |
316 | mfd = sta2x11_mfd_find(*pdev); | 316 | mfd = sta2x11_mfd_find(*pdev); |
317 | if (!mfd) | 317 | if (!mfd) |
318 | return -ENODEV; | 318 | return -ENODEV; |
diff --git a/drivers/mfd/t7l66xb.c b/drivers/mfd/t7l66xb.c index a21bff283a98..9e04a7485981 100644 --- a/drivers/mfd/t7l66xb.c +++ b/drivers/mfd/t7l66xb.c | |||
@@ -281,7 +281,7 @@ static void t7l66xb_detach_irq(struct platform_device *dev) | |||
281 | static int t7l66xb_suspend(struct platform_device *dev, pm_message_t state) | 281 | static int t7l66xb_suspend(struct platform_device *dev, pm_message_t state) |
282 | { | 282 | { |
283 | struct t7l66xb *t7l66xb = platform_get_drvdata(dev); | 283 | struct t7l66xb *t7l66xb = platform_get_drvdata(dev); |
284 | struct t7l66xb_platform_data *pdata = dev->dev.platform_data; | 284 | struct t7l66xb_platform_data *pdata = dev_get_platdata(&dev->dev); |
285 | 285 | ||
286 | if (pdata && pdata->suspend) | 286 | if (pdata && pdata->suspend) |
287 | pdata->suspend(dev); | 287 | pdata->suspend(dev); |
@@ -293,7 +293,7 @@ static int t7l66xb_suspend(struct platform_device *dev, pm_message_t state) | |||
293 | static int t7l66xb_resume(struct platform_device *dev) | 293 | static int t7l66xb_resume(struct platform_device *dev) |
294 | { | 294 | { |
295 | struct t7l66xb *t7l66xb = platform_get_drvdata(dev); | 295 | struct t7l66xb *t7l66xb = platform_get_drvdata(dev); |
296 | struct t7l66xb_platform_data *pdata = dev->dev.platform_data; | 296 | struct t7l66xb_platform_data *pdata = dev_get_platdata(&dev->dev); |
297 | 297 | ||
298 | clk_enable(t7l66xb->clk48m); | 298 | clk_enable(t7l66xb->clk48m); |
299 | if (pdata && pdata->resume) | 299 | if (pdata && pdata->resume) |
@@ -313,7 +313,7 @@ static int t7l66xb_resume(struct platform_device *dev) | |||
313 | 313 | ||
314 | static int t7l66xb_probe(struct platform_device *dev) | 314 | static int t7l66xb_probe(struct platform_device *dev) |
315 | { | 315 | { |
316 | struct t7l66xb_platform_data *pdata = dev->dev.platform_data; | 316 | struct t7l66xb_platform_data *pdata = dev_get_platdata(&dev->dev); |
317 | struct t7l66xb *t7l66xb; | 317 | struct t7l66xb *t7l66xb; |
318 | struct resource *iomem, *rscr; | 318 | struct resource *iomem, *rscr; |
319 | int ret; | 319 | int ret; |
@@ -409,7 +409,7 @@ err_noirq: | |||
409 | 409 | ||
410 | static int t7l66xb_remove(struct platform_device *dev) | 410 | static int t7l66xb_remove(struct platform_device *dev) |
411 | { | 411 | { |
412 | struct t7l66xb_platform_data *pdata = dev->dev.platform_data; | 412 | struct t7l66xb_platform_data *pdata = dev_get_platdata(&dev->dev); |
413 | struct t7l66xb *t7l66xb = platform_get_drvdata(dev); | 413 | struct t7l66xb *t7l66xb = platform_get_drvdata(dev); |
414 | int ret; | 414 | int ret; |
415 | 415 | ||
diff --git a/drivers/mfd/tc3589x.c b/drivers/mfd/tc3589x.c index 4cb92bb2aea2..70f4909fee13 100644 --- a/drivers/mfd/tc3589x.c +++ b/drivers/mfd/tc3589x.c | |||
@@ -325,7 +325,7 @@ static int tc3589x_of_probe(struct device_node *np, | |||
325 | static int tc3589x_probe(struct i2c_client *i2c, | 325 | static int tc3589x_probe(struct i2c_client *i2c, |
326 | const struct i2c_device_id *id) | 326 | const struct i2c_device_id *id) |
327 | { | 327 | { |
328 | struct tc3589x_platform_data *pdata = i2c->dev.platform_data; | 328 | struct tc3589x_platform_data *pdata = dev_get_platdata(&i2c->dev); |
329 | struct device_node *np = i2c->dev.of_node; | 329 | struct device_node *np = i2c->dev.of_node; |
330 | struct tc3589x *tc3589x; | 330 | struct tc3589x *tc3589x; |
331 | int ret; | 331 | int ret; |
diff --git a/drivers/mfd/tc6387xb.c b/drivers/mfd/tc6387xb.c index 65c425a517c5..acd0f3a41044 100644 --- a/drivers/mfd/tc6387xb.c +++ b/drivers/mfd/tc6387xb.c | |||
@@ -48,7 +48,7 @@ static struct resource tc6387xb_mmc_resources[] = { | |||
48 | static int tc6387xb_suspend(struct platform_device *dev, pm_message_t state) | 48 | static int tc6387xb_suspend(struct platform_device *dev, pm_message_t state) |
49 | { | 49 | { |
50 | struct tc6387xb *tc6387xb = platform_get_drvdata(dev); | 50 | struct tc6387xb *tc6387xb = platform_get_drvdata(dev); |
51 | struct tc6387xb_platform_data *pdata = dev->dev.platform_data; | 51 | struct tc6387xb_platform_data *pdata = dev_get_platdata(&dev->dev); |
52 | 52 | ||
53 | if (pdata && pdata->suspend) | 53 | if (pdata && pdata->suspend) |
54 | pdata->suspend(dev); | 54 | pdata->suspend(dev); |
@@ -60,7 +60,7 @@ static int tc6387xb_suspend(struct platform_device *dev, pm_message_t state) | |||
60 | static int tc6387xb_resume(struct platform_device *dev) | 60 | static int tc6387xb_resume(struct platform_device *dev) |
61 | { | 61 | { |
62 | struct tc6387xb *tc6387xb = platform_get_drvdata(dev); | 62 | struct tc6387xb *tc6387xb = platform_get_drvdata(dev); |
63 | struct tc6387xb_platform_data *pdata = dev->dev.platform_data; | 63 | struct tc6387xb_platform_data *pdata = dev_get_platdata(&dev->dev); |
64 | 64 | ||
65 | clk_enable(tc6387xb->clk32k); | 65 | clk_enable(tc6387xb->clk32k); |
66 | if (pdata && pdata->resume) | 66 | if (pdata && pdata->resume) |
@@ -140,7 +140,7 @@ static struct mfd_cell tc6387xb_cells[] = { | |||
140 | 140 | ||
141 | static int tc6387xb_probe(struct platform_device *dev) | 141 | static int tc6387xb_probe(struct platform_device *dev) |
142 | { | 142 | { |
143 | struct tc6387xb_platform_data *pdata = dev->dev.platform_data; | 143 | struct tc6387xb_platform_data *pdata = dev_get_platdata(&dev->dev); |
144 | struct resource *iomem, *rscr; | 144 | struct resource *iomem, *rscr; |
145 | struct clk *clk32k; | 145 | struct clk *clk32k; |
146 | struct tc6387xb *tc6387xb; | 146 | struct tc6387xb *tc6387xb; |
diff --git a/drivers/mfd/tc6393xb.c b/drivers/mfd/tc6393xb.c index a563dfa3cf87..11c19e538551 100644 --- a/drivers/mfd/tc6393xb.c +++ b/drivers/mfd/tc6393xb.c | |||
@@ -604,7 +604,7 @@ static void tc6393xb_detach_irq(struct platform_device *dev) | |||
604 | 604 | ||
605 | static int tc6393xb_probe(struct platform_device *dev) | 605 | static int tc6393xb_probe(struct platform_device *dev) |
606 | { | 606 | { |
607 | struct tc6393xb_platform_data *tcpd = dev->dev.platform_data; | 607 | struct tc6393xb_platform_data *tcpd = dev_get_platdata(&dev->dev); |
608 | struct tc6393xb *tc6393xb; | 608 | struct tc6393xb *tc6393xb; |
609 | struct resource *iomem, *rscr; | 609 | struct resource *iomem, *rscr; |
610 | int ret, temp; | 610 | int ret, temp; |
@@ -733,7 +733,7 @@ err_kzalloc: | |||
733 | 733 | ||
734 | static int tc6393xb_remove(struct platform_device *dev) | 734 | static int tc6393xb_remove(struct platform_device *dev) |
735 | { | 735 | { |
736 | struct tc6393xb_platform_data *tcpd = dev->dev.platform_data; | 736 | struct tc6393xb_platform_data *tcpd = dev_get_platdata(&dev->dev); |
737 | struct tc6393xb *tc6393xb = platform_get_drvdata(dev); | 737 | struct tc6393xb *tc6393xb = platform_get_drvdata(dev); |
738 | int ret; | 738 | int ret; |
739 | 739 | ||
@@ -765,7 +765,7 @@ static int tc6393xb_remove(struct platform_device *dev) | |||
765 | #ifdef CONFIG_PM | 765 | #ifdef CONFIG_PM |
766 | static int tc6393xb_suspend(struct platform_device *dev, pm_message_t state) | 766 | static int tc6393xb_suspend(struct platform_device *dev, pm_message_t state) |
767 | { | 767 | { |
768 | struct tc6393xb_platform_data *tcpd = dev->dev.platform_data; | 768 | struct tc6393xb_platform_data *tcpd = dev_get_platdata(&dev->dev); |
769 | struct tc6393xb *tc6393xb = platform_get_drvdata(dev); | 769 | struct tc6393xb *tc6393xb = platform_get_drvdata(dev); |
770 | int i, ret; | 770 | int i, ret; |
771 | 771 | ||
@@ -788,7 +788,7 @@ static int tc6393xb_suspend(struct platform_device *dev, pm_message_t state) | |||
788 | 788 | ||
789 | static int tc6393xb_resume(struct platform_device *dev) | 789 | static int tc6393xb_resume(struct platform_device *dev) |
790 | { | 790 | { |
791 | struct tc6393xb_platform_data *tcpd = dev->dev.platform_data; | 791 | struct tc6393xb_platform_data *tcpd = dev_get_platdata(&dev->dev); |
792 | struct tc6393xb *tc6393xb = platform_get_drvdata(dev); | 792 | struct tc6393xb *tc6393xb = platform_get_drvdata(dev); |
793 | int ret; | 793 | int ret; |
794 | int i; | 794 | int i; |
diff --git a/drivers/mfd/ti-ssp.c b/drivers/mfd/ti-ssp.c index 09a14cec351b..1c2b994e1f6c 100644 --- a/drivers/mfd/ti-ssp.c +++ b/drivers/mfd/ti-ssp.c | |||
@@ -318,7 +318,7 @@ static irqreturn_t ti_ssp_interrupt(int irq, void *dev_data) | |||
318 | static int ti_ssp_probe(struct platform_device *pdev) | 318 | static int ti_ssp_probe(struct platform_device *pdev) |
319 | { | 319 | { |
320 | static struct ti_ssp *ssp; | 320 | static struct ti_ssp *ssp; |
321 | const struct ti_ssp_data *pdata = pdev->dev.platform_data; | 321 | const struct ti_ssp_data *pdata = dev_get_platdata(&pdev->dev); |
322 | int error = 0, prediv = 0xff, id; | 322 | int error = 0, prediv = 0xff, id; |
323 | unsigned long sysclk; | 323 | unsigned long sysclk; |
324 | struct device *dev = &pdev->dev; | 324 | struct device *dev = &pdev->dev; |
diff --git a/drivers/mfd/tps6105x.c b/drivers/mfd/tps6105x.c index 1d302f583adf..b5dfa6e4e692 100644 --- a/drivers/mfd/tps6105x.c +++ b/drivers/mfd/tps6105x.c | |||
@@ -147,7 +147,7 @@ static int tps6105x_probe(struct i2c_client *client, | |||
147 | 147 | ||
148 | i2c_set_clientdata(client, tps6105x); | 148 | i2c_set_clientdata(client, tps6105x); |
149 | tps6105x->client = client; | 149 | tps6105x->client = client; |
150 | pdata = client->dev.platform_data; | 150 | pdata = dev_get_platdata(&client->dev); |
151 | tps6105x->pdata = pdata; | 151 | tps6105x->pdata = pdata; |
152 | mutex_init(&tps6105x->lock); | 152 | mutex_init(&tps6105x->lock); |
153 | 153 | ||
diff --git a/drivers/mfd/tps65010.c b/drivers/mfd/tps65010.c index da2691f22e11..4d6769268739 100644 --- a/drivers/mfd/tps65010.c +++ b/drivers/mfd/tps65010.c | |||
@@ -517,7 +517,7 @@ static struct tps65010 *the_tps; | |||
517 | static int __exit tps65010_remove(struct i2c_client *client) | 517 | static int __exit tps65010_remove(struct i2c_client *client) |
518 | { | 518 | { |
519 | struct tps65010 *tps = i2c_get_clientdata(client); | 519 | struct tps65010 *tps = i2c_get_clientdata(client); |
520 | struct tps65010_board *board = client->dev.platform_data; | 520 | struct tps65010_board *board = dev_get_platdata(&client->dev); |
521 | 521 | ||
522 | if (board && board->teardown) { | 522 | if (board && board->teardown) { |
523 | int status = board->teardown(client, board->context); | 523 | int status = board->teardown(client, board->context); |
@@ -539,7 +539,7 @@ static int tps65010_probe(struct i2c_client *client, | |||
539 | { | 539 | { |
540 | struct tps65010 *tps; | 540 | struct tps65010 *tps; |
541 | int status; | 541 | int status; |
542 | struct tps65010_board *board = client->dev.platform_data; | 542 | struct tps65010_board *board = dev_get_platdata(&client->dev); |
543 | 543 | ||
544 | if (the_tps) { | 544 | if (the_tps) { |
545 | dev_dbg(&client->dev, "only one tps6501x chip allowed\n"); | 545 | dev_dbg(&client->dev, "only one tps6501x chip allowed\n"); |
diff --git a/drivers/mfd/tps65090.c b/drivers/mfd/tps65090.c index fbd6ee67b5a5..e6f03a733879 100644 --- a/drivers/mfd/tps65090.c +++ b/drivers/mfd/tps65090.c | |||
@@ -172,7 +172,7 @@ MODULE_DEVICE_TABLE(of, tps65090_of_match); | |||
172 | static int tps65090_i2c_probe(struct i2c_client *client, | 172 | static int tps65090_i2c_probe(struct i2c_client *client, |
173 | const struct i2c_device_id *id) | 173 | const struct i2c_device_id *id) |
174 | { | 174 | { |
175 | struct tps65090_platform_data *pdata = client->dev.platform_data; | 175 | struct tps65090_platform_data *pdata = dev_get_platdata(&client->dev); |
176 | int irq_base = 0; | 176 | int irq_base = 0; |
177 | struct tps65090 *tps65090; | 177 | struct tps65090 *tps65090; |
178 | int ret; | 178 | int ret; |
diff --git a/drivers/mfd/tps6586x.c b/drivers/mfd/tps6586x.c index 4b93ed4d5cd6..f54fe4d4f77b 100644 --- a/drivers/mfd/tps6586x.c +++ b/drivers/mfd/tps6586x.c | |||
@@ -462,7 +462,7 @@ static void tps6586x_power_off(void) | |||
462 | static int tps6586x_i2c_probe(struct i2c_client *client, | 462 | static int tps6586x_i2c_probe(struct i2c_client *client, |
463 | const struct i2c_device_id *id) | 463 | const struct i2c_device_id *id) |
464 | { | 464 | { |
465 | struct tps6586x_platform_data *pdata = client->dev.platform_data; | 465 | struct tps6586x_platform_data *pdata = dev_get_platdata(&client->dev); |
466 | struct tps6586x *tps6586x; | 466 | struct tps6586x *tps6586x; |
467 | int ret; | 467 | int ret; |
468 | 468 | ||
diff --git a/drivers/mfd/tps65912-core.c b/drivers/mfd/tps65912-core.c index 479886a4cf80..925a044cbdf6 100644 --- a/drivers/mfd/tps65912-core.c +++ b/drivers/mfd/tps65912-core.c | |||
@@ -123,7 +123,7 @@ EXPORT_SYMBOL_GPL(tps65912_reg_write); | |||
123 | 123 | ||
124 | int tps65912_device_init(struct tps65912 *tps65912) | 124 | int tps65912_device_init(struct tps65912 *tps65912) |
125 | { | 125 | { |
126 | struct tps65912_board *pmic_plat_data = tps65912->dev->platform_data; | 126 | struct tps65912_board *pmic_plat_data = dev_get_platdata(tps65912->dev); |
127 | struct tps65912_platform_data *init_data; | 127 | struct tps65912_platform_data *init_data; |
128 | int ret, dcdc_avs, value; | 128 | int ret, dcdc_avs, value; |
129 | 129 | ||
diff --git a/drivers/mfd/tps80031.c b/drivers/mfd/tps80031.c index c90a2c450f51..f15ee6d5cfbf 100644 --- a/drivers/mfd/tps80031.c +++ b/drivers/mfd/tps80031.c | |||
@@ -418,7 +418,7 @@ static const struct regmap_config tps80031_regmap_configs[] = { | |||
418 | static int tps80031_probe(struct i2c_client *client, | 418 | static int tps80031_probe(struct i2c_client *client, |
419 | const struct i2c_device_id *id) | 419 | const struct i2c_device_id *id) |
420 | { | 420 | { |
421 | struct tps80031_platform_data *pdata = client->dev.platform_data; | 421 | struct tps80031_platform_data *pdata = dev_get_platdata(&client->dev); |
422 | struct tps80031 *tps80031; | 422 | struct tps80031 *tps80031; |
423 | int ret; | 423 | int ret; |
424 | uint8_t es_version; | 424 | uint8_t es_version; |
diff --git a/drivers/mfd/twl-core.c b/drivers/mfd/twl-core.c index 7f150d94d295..29473c2c95ae 100644 --- a/drivers/mfd/twl-core.c +++ b/drivers/mfd/twl-core.c | |||
@@ -1137,7 +1137,7 @@ static int twl_remove(struct i2c_client *client) | |||
1137 | static int | 1137 | static int |
1138 | twl_probe(struct i2c_client *client, const struct i2c_device_id *id) | 1138 | twl_probe(struct i2c_client *client, const struct i2c_device_id *id) |
1139 | { | 1139 | { |
1140 | struct twl4030_platform_data *pdata = client->dev.platform_data; | 1140 | struct twl4030_platform_data *pdata = dev_get_platdata(&client->dev); |
1141 | struct device_node *node = client->dev.of_node; | 1141 | struct device_node *node = client->dev.of_node; |
1142 | struct platform_device *pdev; | 1142 | struct platform_device *pdev; |
1143 | struct regmap_config *twl_regmap_config; | 1143 | struct regmap_config *twl_regmap_config; |
diff --git a/drivers/mfd/twl4030-audio.c b/drivers/mfd/twl4030-audio.c index a31fba96ef43..07fe542e6fc0 100644 --- a/drivers/mfd/twl4030-audio.c +++ b/drivers/mfd/twl4030-audio.c | |||
@@ -187,7 +187,7 @@ static bool twl4030_audio_has_vibra(struct twl4030_audio_data *pdata, | |||
187 | static int twl4030_audio_probe(struct platform_device *pdev) | 187 | static int twl4030_audio_probe(struct platform_device *pdev) |
188 | { | 188 | { |
189 | struct twl4030_audio *audio; | 189 | struct twl4030_audio *audio; |
190 | struct twl4030_audio_data *pdata = pdev->dev.platform_data; | 190 | struct twl4030_audio_data *pdata = dev_get_platdata(&pdev->dev); |
191 | struct device_node *node = pdev->dev.of_node; | 191 | struct device_node *node = pdev->dev.of_node; |
192 | struct mfd_cell *cell = NULL; | 192 | struct mfd_cell *cell = NULL; |
193 | int ret, childs = 0; | 193 | int ret, childs = 0; |
diff --git a/drivers/mfd/twl4030-madc.c b/drivers/mfd/twl4030-madc.c index 1ea54d4d003a..4c583e471339 100644 --- a/drivers/mfd/twl4030-madc.c +++ b/drivers/mfd/twl4030-madc.c | |||
@@ -701,7 +701,7 @@ static int twl4030_madc_set_power(struct twl4030_madc_data *madc, int on) | |||
701 | static int twl4030_madc_probe(struct platform_device *pdev) | 701 | static int twl4030_madc_probe(struct platform_device *pdev) |
702 | { | 702 | { |
703 | struct twl4030_madc_data *madc; | 703 | struct twl4030_madc_data *madc; |
704 | struct twl4030_madc_platform_data *pdata = pdev->dev.platform_data; | 704 | struct twl4030_madc_platform_data *pdata = dev_get_platdata(&pdev->dev); |
705 | int ret; | 705 | int ret; |
706 | u8 regval; | 706 | u8 regval; |
707 | 707 | ||
diff --git a/drivers/mfd/twl4030-power.c b/drivers/mfd/twl4030-power.c index a5fd3c738211..275ec5704c71 100644 --- a/drivers/mfd/twl4030-power.c +++ b/drivers/mfd/twl4030-power.c | |||
@@ -555,7 +555,7 @@ static bool twl4030_power_use_poweroff(struct twl4030_power_data *pdata, | |||
555 | 555 | ||
556 | int twl4030_power_probe(struct platform_device *pdev) | 556 | int twl4030_power_probe(struct platform_device *pdev) |
557 | { | 557 | { |
558 | struct twl4030_power_data *pdata = pdev->dev.platform_data; | 558 | struct twl4030_power_data *pdata = dev_get_platdata(&pdev->dev); |
559 | struct device_node *node = pdev->dev.of_node; | 559 | struct device_node *node = pdev->dev.of_node; |
560 | int err = 0; | 560 | int err = 0; |
561 | int err2 = 0; | 561 | int err2 = 0; |
diff --git a/drivers/mfd/ucb1400_core.c b/drivers/mfd/ucb1400_core.c index e9031fa9d53d..ebb20edf9c17 100644 --- a/drivers/mfd/ucb1400_core.c +++ b/drivers/mfd/ucb1400_core.c | |||
@@ -52,7 +52,7 @@ static int ucb1400_core_probe(struct device *dev) | |||
52 | struct ucb1400_ts ucb_ts; | 52 | struct ucb1400_ts ucb_ts; |
53 | struct ucb1400_gpio ucb_gpio; | 53 | struct ucb1400_gpio ucb_gpio; |
54 | struct snd_ac97 *ac97; | 54 | struct snd_ac97 *ac97; |
55 | struct ucb1400_pdata *pdata = dev->platform_data; | 55 | struct ucb1400_pdata *pdata = dev_get_platdata(dev); |
56 | 56 | ||
57 | memset(&ucb_ts, 0, sizeof(ucb_ts)); | 57 | memset(&ucb_ts, 0, sizeof(ucb_ts)); |
58 | memset(&ucb_gpio, 0, sizeof(ucb_gpio)); | 58 | memset(&ucb_gpio, 0, sizeof(ucb_gpio)); |
diff --git a/drivers/mfd/ucb1x00-core.c b/drivers/mfd/ucb1x00-core.c index 70f02daeb22a..48ad48c2ef25 100644 --- a/drivers/mfd/ucb1x00-core.c +++ b/drivers/mfd/ucb1x00-core.c | |||
@@ -671,7 +671,7 @@ void ucb1x00_unregister_driver(struct ucb1x00_driver *drv) | |||
671 | 671 | ||
672 | static int ucb1x00_suspend(struct device *dev) | 672 | static int ucb1x00_suspend(struct device *dev) |
673 | { | 673 | { |
674 | struct ucb1x00_plat_data *pdata = dev->platform_data; | 674 | struct ucb1x00_plat_data *pdata = dev_get_platdata(dev); |
675 | struct ucb1x00 *ucb = dev_get_drvdata(dev); | 675 | struct ucb1x00 *ucb = dev_get_drvdata(dev); |
676 | struct ucb1x00_dev *udev; | 676 | struct ucb1x00_dev *udev; |
677 | 677 | ||
@@ -703,7 +703,7 @@ static int ucb1x00_suspend(struct device *dev) | |||
703 | 703 | ||
704 | static int ucb1x00_resume(struct device *dev) | 704 | static int ucb1x00_resume(struct device *dev) |
705 | { | 705 | { |
706 | struct ucb1x00_plat_data *pdata = dev->platform_data; | 706 | struct ucb1x00_plat_data *pdata = dev_get_platdata(dev); |
707 | struct ucb1x00 *ucb = dev_get_drvdata(dev); | 707 | struct ucb1x00 *ucb = dev_get_drvdata(dev); |
708 | struct ucb1x00_dev *udev; | 708 | struct ucb1x00_dev *udev; |
709 | 709 | ||
diff --git a/drivers/mfd/wl1273-core.c b/drivers/mfd/wl1273-core.c index edbe6c1b755a..1288e9943f01 100644 --- a/drivers/mfd/wl1273-core.c +++ b/drivers/mfd/wl1273-core.c | |||
@@ -185,7 +185,7 @@ static int wl1273_core_remove(struct i2c_client *client) | |||
185 | static int wl1273_core_probe(struct i2c_client *client, | 185 | static int wl1273_core_probe(struct i2c_client *client, |
186 | const struct i2c_device_id *id) | 186 | const struct i2c_device_id *id) |
187 | { | 187 | { |
188 | struct wl1273_fm_platform_data *pdata = client->dev.platform_data; | 188 | struct wl1273_fm_platform_data *pdata = dev_get_platdata(&client->dev); |
189 | struct wl1273_core *core; | 189 | struct wl1273_core *core; |
190 | struct mfd_cell *cell; | 190 | struct mfd_cell *cell; |
191 | int children = 0; | 191 | int children = 0; |
diff --git a/drivers/mfd/wm831x-core.c b/drivers/mfd/wm831x-core.c index 521340a708d3..5c459f469224 100644 --- a/drivers/mfd/wm831x-core.c +++ b/drivers/mfd/wm831x-core.c | |||
@@ -1618,7 +1618,7 @@ EXPORT_SYMBOL_GPL(wm831x_regmap_config); | |||
1618 | */ | 1618 | */ |
1619 | int wm831x_device_init(struct wm831x *wm831x, unsigned long id, int irq) | 1619 | int wm831x_device_init(struct wm831x *wm831x, unsigned long id, int irq) |
1620 | { | 1620 | { |
1621 | struct wm831x_pdata *pdata = wm831x->dev->platform_data; | 1621 | struct wm831x_pdata *pdata = dev_get_platdata(wm831x->dev); |
1622 | int rev, wm831x_num; | 1622 | int rev, wm831x_num; |
1623 | enum wm831x_parent parent; | 1623 | enum wm831x_parent parent; |
1624 | int ret, i; | 1624 | int ret, i; |
diff --git a/drivers/mfd/wm831x-irq.c b/drivers/mfd/wm831x-irq.c index 804e56ec99eb..64e512eadf17 100644 --- a/drivers/mfd/wm831x-irq.c +++ b/drivers/mfd/wm831x-irq.c | |||
@@ -571,7 +571,7 @@ static struct irq_domain_ops wm831x_irq_domain_ops = { | |||
571 | 571 | ||
572 | int wm831x_irq_init(struct wm831x *wm831x, int irq) | 572 | int wm831x_irq_init(struct wm831x *wm831x, int irq) |
573 | { | 573 | { |
574 | struct wm831x_pdata *pdata = wm831x->dev->platform_data; | 574 | struct wm831x_pdata *pdata = dev_get_platdata(wm831x->dev); |
575 | struct irq_domain *domain; | 575 | struct irq_domain *domain; |
576 | int i, ret, irq_base; | 576 | int i, ret, irq_base; |
577 | 577 | ||
diff --git a/drivers/mfd/wm8350-i2c.c b/drivers/mfd/wm8350-i2c.c index 2e57101c8d3d..f919def05e24 100644 --- a/drivers/mfd/wm8350-i2c.c +++ b/drivers/mfd/wm8350-i2c.c | |||
@@ -27,6 +27,7 @@ static int wm8350_i2c_probe(struct i2c_client *i2c, | |||
27 | const struct i2c_device_id *id) | 27 | const struct i2c_device_id *id) |
28 | { | 28 | { |
29 | struct wm8350 *wm8350; | 29 | struct wm8350 *wm8350; |
30 | struct wm8350_platform_data *pdata = dev_get_platdata(&i2c->dev); | ||
30 | int ret = 0; | 31 | int ret = 0; |
31 | 32 | ||
32 | wm8350 = devm_kzalloc(&i2c->dev, sizeof(struct wm8350), GFP_KERNEL); | 33 | wm8350 = devm_kzalloc(&i2c->dev, sizeof(struct wm8350), GFP_KERNEL); |
@@ -44,7 +45,7 @@ static int wm8350_i2c_probe(struct i2c_client *i2c, | |||
44 | i2c_set_clientdata(i2c, wm8350); | 45 | i2c_set_clientdata(i2c, wm8350); |
45 | wm8350->dev = &i2c->dev; | 46 | wm8350->dev = &i2c->dev; |
46 | 47 | ||
47 | return wm8350_device_init(wm8350, i2c->irq, i2c->dev.platform_data); | 48 | return wm8350_device_init(wm8350, i2c->irq, pdata); |
48 | } | 49 | } |
49 | 50 | ||
50 | static int wm8350_i2c_remove(struct i2c_client *i2c) | 51 | static int wm8350_i2c_remove(struct i2c_client *i2c) |
diff --git a/drivers/mfd/wm8400-core.c b/drivers/mfd/wm8400-core.c index 639ca359242f..d66d256551fb 100644 --- a/drivers/mfd/wm8400-core.c +++ b/drivers/mfd/wm8400-core.c | |||
@@ -178,7 +178,7 @@ static int wm8400_i2c_probe(struct i2c_client *i2c, | |||
178 | wm8400->dev = &i2c->dev; | 178 | wm8400->dev = &i2c->dev; |
179 | i2c_set_clientdata(i2c, wm8400); | 179 | i2c_set_clientdata(i2c, wm8400); |
180 | 180 | ||
181 | ret = wm8400_init(wm8400, i2c->dev.platform_data); | 181 | ret = wm8400_init(wm8400, dev_get_platdata(&i2c->dev)); |
182 | if (ret != 0) | 182 | if (ret != 0) |
183 | goto err; | 183 | goto err; |
184 | 184 | ||
diff --git a/drivers/mfd/wm8994-irq.c b/drivers/mfd/wm8994-irq.c index d3a184a240f5..e74dedda5b55 100644 --- a/drivers/mfd/wm8994-irq.c +++ b/drivers/mfd/wm8994-irq.c | |||
@@ -193,7 +193,7 @@ int wm8994_irq_init(struct wm8994 *wm8994) | |||
193 | { | 193 | { |
194 | int ret; | 194 | int ret; |
195 | unsigned long irqflags; | 195 | unsigned long irqflags; |
196 | struct wm8994_pdata *pdata = wm8994->dev->platform_data; | 196 | struct wm8994_pdata *pdata = dev_get_platdata(wm8994->dev); |
197 | 197 | ||
198 | if (!wm8994->irq) { | 198 | if (!wm8994->irq) { |
199 | dev_warn(wm8994->dev, | 199 | dev_warn(wm8994->dev, |