diff options
author | Andres Salomon <dilinger@queued.net> | 2011-02-17 22:07:15 -0500 |
---|---|---|
committer | Samuel Ortiz <sameo@linux.intel.com> | 2011-03-23 05:41:52 -0400 |
commit | e46dccff341068d8530610a822965794f70b998f (patch) | |
tree | a1f567ef8299629456f8a0309761f7d217a95006 | |
parent | 07ae2a08deb141f22d7974615bd3006e8dce3883 (diff) |
mfd: mfd_cell is now implicitly available to timberdale drivers
The cell's platform_data is now accessed with a helper function;
change clients to use that, and remove the now-unused data_size.
Note that the mfd's platform_data is marked __devinitdata. This
is still correct in all cases except for the timbgpio driver, whose
remove hook has been changed to no longer reference the pdata.
Signed-off-by: Andres Salomon <dilinger@queued.net>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
-rw-r--r-- | drivers/dma/timb_dma.c | 3 | ||||
-rw-r--r-- | drivers/gpio/timbgpio.c | 6 | ||||
-rw-r--r-- | drivers/i2c/busses/i2c-ocores.c | 3 | ||||
-rw-r--r-- | drivers/i2c/busses/i2c-xiic.c | 3 | ||||
-rw-r--r-- | drivers/media/radio/radio-timb.c | 3 | ||||
-rw-r--r-- | drivers/media/video/timblogiw.c | 3 | ||||
-rw-r--r-- | drivers/mfd/timberdale.c | 27 | ||||
-rw-r--r-- | drivers/net/ks8842.c | 3 | ||||
-rw-r--r-- | drivers/spi/xilinx_spi.c | 3 |
9 files changed, 17 insertions, 37 deletions
diff --git a/drivers/dma/timb_dma.c b/drivers/dma/timb_dma.c index f69f90a61873..d2c75feff7df 100644 --- a/drivers/dma/timb_dma.c +++ b/drivers/dma/timb_dma.c | |||
@@ -27,6 +27,7 @@ | |||
27 | #include <linux/io.h> | 27 | #include <linux/io.h> |
28 | #include <linux/module.h> | 28 | #include <linux/module.h> |
29 | #include <linux/platform_device.h> | 29 | #include <linux/platform_device.h> |
30 | #include <linux/mfd/core.h> | ||
30 | #include <linux/slab.h> | 31 | #include <linux/slab.h> |
31 | 32 | ||
32 | #include <linux/timb_dma.h> | 33 | #include <linux/timb_dma.h> |
@@ -684,7 +685,7 @@ static irqreturn_t td_irq(int irq, void *devid) | |||
684 | 685 | ||
685 | static int __devinit td_probe(struct platform_device *pdev) | 686 | static int __devinit td_probe(struct platform_device *pdev) |
686 | { | 687 | { |
687 | struct timb_dma_platform_data *pdata = pdev->dev.platform_data; | 688 | struct timb_dma_platform_data *pdata = mfd_get_data(pdev); |
688 | struct timb_dma *td; | 689 | struct timb_dma *td; |
689 | struct resource *iomem; | 690 | struct resource *iomem; |
690 | int irq; | 691 | int irq; |
diff --git a/drivers/gpio/timbgpio.c b/drivers/gpio/timbgpio.c index 58c8f30352dd..ffcd815b8b8b 100644 --- a/drivers/gpio/timbgpio.c +++ b/drivers/gpio/timbgpio.c | |||
@@ -23,6 +23,7 @@ | |||
23 | #include <linux/module.h> | 23 | #include <linux/module.h> |
24 | #include <linux/gpio.h> | 24 | #include <linux/gpio.h> |
25 | #include <linux/platform_device.h> | 25 | #include <linux/platform_device.h> |
26 | #include <linux/mfd/core.h> | ||
26 | #include <linux/irq.h> | 27 | #include <linux/irq.h> |
27 | #include <linux/io.h> | 28 | #include <linux/io.h> |
28 | #include <linux/timb_gpio.h> | 29 | #include <linux/timb_gpio.h> |
@@ -228,7 +229,7 @@ static int __devinit timbgpio_probe(struct platform_device *pdev) | |||
228 | struct gpio_chip *gc; | 229 | struct gpio_chip *gc; |
229 | struct timbgpio *tgpio; | 230 | struct timbgpio *tgpio; |
230 | struct resource *iomem; | 231 | struct resource *iomem; |
231 | struct timbgpio_platform_data *pdata = pdev->dev.platform_data; | 232 | struct timbgpio_platform_data *pdata = mfd_get_data(pdev); |
232 | int irq = platform_get_irq(pdev, 0); | 233 | int irq = platform_get_irq(pdev, 0); |
233 | 234 | ||
234 | if (!pdata || pdata->nr_pins > 32) { | 235 | if (!pdata || pdata->nr_pins > 32) { |
@@ -319,14 +320,13 @@ err_mem: | |||
319 | static int __devexit timbgpio_remove(struct platform_device *pdev) | 320 | static int __devexit timbgpio_remove(struct platform_device *pdev) |
320 | { | 321 | { |
321 | int err; | 322 | int err; |
322 | struct timbgpio_platform_data *pdata = pdev->dev.platform_data; | ||
323 | struct timbgpio *tgpio = platform_get_drvdata(pdev); | 323 | struct timbgpio *tgpio = platform_get_drvdata(pdev); |
324 | struct resource *iomem = platform_get_resource(pdev, IORESOURCE_MEM, 0); | 324 | struct resource *iomem = platform_get_resource(pdev, IORESOURCE_MEM, 0); |
325 | int irq = platform_get_irq(pdev, 0); | 325 | int irq = platform_get_irq(pdev, 0); |
326 | 326 | ||
327 | if (irq >= 0 && tgpio->irq_base > 0) { | 327 | if (irq >= 0 && tgpio->irq_base > 0) { |
328 | int i; | 328 | int i; |
329 | for (i = 0; i < pdata->nr_pins; i++) { | 329 | for (i = 0; i < tgpio->gpio.ngpio; i++) { |
330 | set_irq_chip(tgpio->irq_base + i, NULL); | 330 | set_irq_chip(tgpio->irq_base + i, NULL); |
331 | set_irq_chip_data(tgpio->irq_base + i, NULL); | 331 | set_irq_chip_data(tgpio->irq_base + i, NULL); |
332 | } | 332 | } |
diff --git a/drivers/i2c/busses/i2c-ocores.c b/drivers/i2c/busses/i2c-ocores.c index 1b46a9d9f907..fee1a2613861 100644 --- a/drivers/i2c/busses/i2c-ocores.c +++ b/drivers/i2c/busses/i2c-ocores.c | |||
@@ -49,6 +49,7 @@ | |||
49 | #include <linux/init.h> | 49 | #include <linux/init.h> |
50 | #include <linux/errno.h> | 50 | #include <linux/errno.h> |
51 | #include <linux/platform_device.h> | 51 | #include <linux/platform_device.h> |
52 | #include <linux/mfd/core.h> | ||
52 | #include <linux/i2c.h> | 53 | #include <linux/i2c.h> |
53 | #include <linux/interrupt.h> | 54 | #include <linux/interrupt.h> |
54 | #include <linux/wait.h> | 55 | #include <linux/wait.h> |
@@ -305,7 +306,7 @@ static int __devinit ocores_i2c_probe(struct platform_device *pdev) | |||
305 | return -EIO; | 306 | return -EIO; |
306 | } | 307 | } |
307 | 308 | ||
308 | pdata = pdev->dev.platform_data; | 309 | pdata = mfd_get_data(pdev); |
309 | if (pdata) { | 310 | if (pdata) { |
310 | i2c->regstep = pdata->regstep; | 311 | i2c->regstep = pdata->regstep; |
311 | i2c->clock_khz = pdata->clock_khz; | 312 | i2c->clock_khz = pdata->clock_khz; |
diff --git a/drivers/i2c/busses/i2c-xiic.c b/drivers/i2c/busses/i2c-xiic.c index a9c419e075a5..9fbd7e6fe32e 100644 --- a/drivers/i2c/busses/i2c-xiic.c +++ b/drivers/i2c/busses/i2c-xiic.c | |||
@@ -34,6 +34,7 @@ | |||
34 | #include <linux/errno.h> | 34 | #include <linux/errno.h> |
35 | #include <linux/delay.h> | 35 | #include <linux/delay.h> |
36 | #include <linux/platform_device.h> | 36 | #include <linux/platform_device.h> |
37 | #include <linux/mfd/core.h> | ||
37 | #include <linux/i2c.h> | 38 | #include <linux/i2c.h> |
38 | #include <linux/interrupt.h> | 39 | #include <linux/interrupt.h> |
39 | #include <linux/wait.h> | 40 | #include <linux/wait.h> |
@@ -704,7 +705,7 @@ static int __devinit xiic_i2c_probe(struct platform_device *pdev) | |||
704 | if (irq < 0) | 705 | if (irq < 0) |
705 | goto resource_missing; | 706 | goto resource_missing; |
706 | 707 | ||
707 | pdata = (struct xiic_i2c_platform_data *) pdev->dev.platform_data; | 708 | pdata = mfd_get_data(pdev); |
708 | if (!pdata) | 709 | if (!pdata) |
709 | return -EINVAL; | 710 | return -EINVAL; |
710 | 711 | ||
diff --git a/drivers/media/radio/radio-timb.c b/drivers/media/radio/radio-timb.c index a185610b376b..1e3a8dd820a4 100644 --- a/drivers/media/radio/radio-timb.c +++ b/drivers/media/radio/radio-timb.c | |||
@@ -21,6 +21,7 @@ | |||
21 | #include <media/v4l2-ioctl.h> | 21 | #include <media/v4l2-ioctl.h> |
22 | #include <media/v4l2-device.h> | 22 | #include <media/v4l2-device.h> |
23 | #include <linux/platform_device.h> | 23 | #include <linux/platform_device.h> |
24 | #include <linux/mfd/core.h> | ||
24 | #include <linux/interrupt.h> | 25 | #include <linux/interrupt.h> |
25 | #include <linux/slab.h> | 26 | #include <linux/slab.h> |
26 | #include <linux/i2c.h> | 27 | #include <linux/i2c.h> |
@@ -148,7 +149,7 @@ static const struct v4l2_file_operations timbradio_fops = { | |||
148 | 149 | ||
149 | static int __devinit timbradio_probe(struct platform_device *pdev) | 150 | static int __devinit timbradio_probe(struct platform_device *pdev) |
150 | { | 151 | { |
151 | struct timb_radio_platform_data *pdata = pdev->dev.platform_data; | 152 | struct timb_radio_platform_data *pdata = mfd_get_data(pdev); |
152 | struct timbradio *tr; | 153 | struct timbradio *tr; |
153 | int err; | 154 | int err; |
154 | 155 | ||
diff --git a/drivers/media/video/timblogiw.c b/drivers/media/video/timblogiw.c index fc611ebeb82c..84d4c7c83435 100644 --- a/drivers/media/video/timblogiw.c +++ b/drivers/media/video/timblogiw.c | |||
@@ -24,6 +24,7 @@ | |||
24 | #include <linux/platform_device.h> | 24 | #include <linux/platform_device.h> |
25 | #include <linux/slab.h> | 25 | #include <linux/slab.h> |
26 | #include <linux/dmaengine.h> | 26 | #include <linux/dmaengine.h> |
27 | #include <linux/mfd/core.h> | ||
27 | #include <linux/scatterlist.h> | 28 | #include <linux/scatterlist.h> |
28 | #include <linux/interrupt.h> | 29 | #include <linux/interrupt.h> |
29 | #include <linux/list.h> | 30 | #include <linux/list.h> |
@@ -790,7 +791,7 @@ static int __devinit timblogiw_probe(struct platform_device *pdev) | |||
790 | { | 791 | { |
791 | int err; | 792 | int err; |
792 | struct timblogiw *lw = NULL; | 793 | struct timblogiw *lw = NULL; |
793 | struct timb_video_platform_data *pdata = pdev->dev.platform_data; | 794 | struct timb_video_platform_data *pdata = mfd_get_data(pdev); |
794 | 795 | ||
795 | if (!pdata) { | 796 | if (!pdata) { |
796 | dev_err(&pdev->dev, "No platform data\n"); | 797 | dev_err(&pdev->dev, "No platform data\n"); |
diff --git a/drivers/mfd/timberdale.c b/drivers/mfd/timberdale.c index 6ad8a7f8d390..6353921c1729 100644 --- a/drivers/mfd/timberdale.c +++ b/drivers/mfd/timberdale.c | |||
@@ -385,7 +385,6 @@ static __devinitdata struct mfd_cell timberdale_cells_bar0_cfg0[] = { | |||
385 | .num_resources = ARRAY_SIZE(timberdale_dma_resources), | 385 | .num_resources = ARRAY_SIZE(timberdale_dma_resources), |
386 | .resources = timberdale_dma_resources, | 386 | .resources = timberdale_dma_resources, |
387 | .platform_data = &timb_dma_platform_data, | 387 | .platform_data = &timb_dma_platform_data, |
388 | .data_size = sizeof(timb_dma_platform_data), | ||
389 | }, | 388 | }, |
390 | { | 389 | { |
391 | .name = "timb-uart", | 390 | .name = "timb-uart", |
@@ -397,42 +396,36 @@ static __devinitdata struct mfd_cell timberdale_cells_bar0_cfg0[] = { | |||
397 | .num_resources = ARRAY_SIZE(timberdale_xiic_resources), | 396 | .num_resources = ARRAY_SIZE(timberdale_xiic_resources), |
398 | .resources = timberdale_xiic_resources, | 397 | .resources = timberdale_xiic_resources, |
399 | .platform_data = &timberdale_xiic_platform_data, | 398 | .platform_data = &timberdale_xiic_platform_data, |
400 | .data_size = sizeof(timberdale_xiic_platform_data), | ||
401 | }, | 399 | }, |
402 | { | 400 | { |
403 | .name = "timb-gpio", | 401 | .name = "timb-gpio", |
404 | .num_resources = ARRAY_SIZE(timberdale_gpio_resources), | 402 | .num_resources = ARRAY_SIZE(timberdale_gpio_resources), |
405 | .resources = timberdale_gpio_resources, | 403 | .resources = timberdale_gpio_resources, |
406 | .platform_data = &timberdale_gpio_platform_data, | 404 | .platform_data = &timberdale_gpio_platform_data, |
407 | .data_size = sizeof(timberdale_gpio_platform_data), | ||
408 | }, | 405 | }, |
409 | { | 406 | { |
410 | .name = "timb-video", | 407 | .name = "timb-video", |
411 | .num_resources = ARRAY_SIZE(timberdale_video_resources), | 408 | .num_resources = ARRAY_SIZE(timberdale_video_resources), |
412 | .resources = timberdale_video_resources, | 409 | .resources = timberdale_video_resources, |
413 | .platform_data = &timberdale_video_platform_data, | 410 | .platform_data = &timberdale_video_platform_data, |
414 | .data_size = sizeof(timberdale_video_platform_data), | ||
415 | }, | 411 | }, |
416 | { | 412 | { |
417 | .name = "timb-radio", | 413 | .name = "timb-radio", |
418 | .num_resources = ARRAY_SIZE(timberdale_radio_resources), | 414 | .num_resources = ARRAY_SIZE(timberdale_radio_resources), |
419 | .resources = timberdale_radio_resources, | 415 | .resources = timberdale_radio_resources, |
420 | .platform_data = &timberdale_radio_platform_data, | 416 | .platform_data = &timberdale_radio_platform_data, |
421 | .data_size = sizeof(timberdale_radio_platform_data), | ||
422 | }, | 417 | }, |
423 | { | 418 | { |
424 | .name = "xilinx_spi", | 419 | .name = "xilinx_spi", |
425 | .num_resources = ARRAY_SIZE(timberdale_spi_resources), | 420 | .num_resources = ARRAY_SIZE(timberdale_spi_resources), |
426 | .resources = timberdale_spi_resources, | 421 | .resources = timberdale_spi_resources, |
427 | .platform_data = &timberdale_xspi_platform_data, | 422 | .platform_data = &timberdale_xspi_platform_data, |
428 | .data_size = sizeof(timberdale_xspi_platform_data), | ||
429 | }, | 423 | }, |
430 | { | 424 | { |
431 | .name = "ks8842", | 425 | .name = "ks8842", |
432 | .num_resources = ARRAY_SIZE(timberdale_eth_resources), | 426 | .num_resources = ARRAY_SIZE(timberdale_eth_resources), |
433 | .resources = timberdale_eth_resources, | 427 | .resources = timberdale_eth_resources, |
434 | .platform_data = &timberdale_ks8842_platform_data, | 428 | .platform_data = &timberdale_ks8842_platform_data, |
435 | .data_size = sizeof(timberdale_ks8842_platform_data) | ||
436 | }, | 429 | }, |
437 | }; | 430 | }; |
438 | 431 | ||
@@ -442,7 +435,6 @@ static __devinitdata struct mfd_cell timberdale_cells_bar0_cfg1[] = { | |||
442 | .num_resources = ARRAY_SIZE(timberdale_dma_resources), | 435 | .num_resources = ARRAY_SIZE(timberdale_dma_resources), |
443 | .resources = timberdale_dma_resources, | 436 | .resources = timberdale_dma_resources, |
444 | .platform_data = &timb_dma_platform_data, | 437 | .platform_data = &timb_dma_platform_data, |
445 | .data_size = sizeof(timb_dma_platform_data), | ||
446 | }, | 438 | }, |
447 | { | 439 | { |
448 | .name = "timb-uart", | 440 | .name = "timb-uart", |
@@ -459,14 +451,12 @@ static __devinitdata struct mfd_cell timberdale_cells_bar0_cfg1[] = { | |||
459 | .num_resources = ARRAY_SIZE(timberdale_xiic_resources), | 451 | .num_resources = ARRAY_SIZE(timberdale_xiic_resources), |
460 | .resources = timberdale_xiic_resources, | 452 | .resources = timberdale_xiic_resources, |
461 | .platform_data = &timberdale_xiic_platform_data, | 453 | .platform_data = &timberdale_xiic_platform_data, |
462 | .data_size = sizeof(timberdale_xiic_platform_data), | ||
463 | }, | 454 | }, |
464 | { | 455 | { |
465 | .name = "timb-gpio", | 456 | .name = "timb-gpio", |
466 | .num_resources = ARRAY_SIZE(timberdale_gpio_resources), | 457 | .num_resources = ARRAY_SIZE(timberdale_gpio_resources), |
467 | .resources = timberdale_gpio_resources, | 458 | .resources = timberdale_gpio_resources, |
468 | .platform_data = &timberdale_gpio_platform_data, | 459 | .platform_data = &timberdale_gpio_platform_data, |
469 | .data_size = sizeof(timberdale_gpio_platform_data), | ||
470 | }, | 460 | }, |
471 | { | 461 | { |
472 | .name = "timb-mlogicore", | 462 | .name = "timb-mlogicore", |
@@ -478,28 +468,24 @@ static __devinitdata struct mfd_cell timberdale_cells_bar0_cfg1[] = { | |||
478 | .num_resources = ARRAY_SIZE(timberdale_video_resources), | 468 | .num_resources = ARRAY_SIZE(timberdale_video_resources), |
479 | .resources = timberdale_video_resources, | 469 | .resources = timberdale_video_resources, |
480 | .platform_data = &timberdale_video_platform_data, | 470 | .platform_data = &timberdale_video_platform_data, |
481 | .data_size = sizeof(timberdale_video_platform_data), | ||
482 | }, | 471 | }, |
483 | { | 472 | { |
484 | .name = "timb-radio", | 473 | .name = "timb-radio", |
485 | .num_resources = ARRAY_SIZE(timberdale_radio_resources), | 474 | .num_resources = ARRAY_SIZE(timberdale_radio_resources), |
486 | .resources = timberdale_radio_resources, | 475 | .resources = timberdale_radio_resources, |
487 | .platform_data = &timberdale_radio_platform_data, | 476 | .platform_data = &timberdale_radio_platform_data, |
488 | .data_size = sizeof(timberdale_radio_platform_data), | ||
489 | }, | 477 | }, |
490 | { | 478 | { |
491 | .name = "xilinx_spi", | 479 | .name = "xilinx_spi", |
492 | .num_resources = ARRAY_SIZE(timberdale_spi_resources), | 480 | .num_resources = ARRAY_SIZE(timberdale_spi_resources), |
493 | .resources = timberdale_spi_resources, | 481 | .resources = timberdale_spi_resources, |
494 | .platform_data = &timberdale_xspi_platform_data, | 482 | .platform_data = &timberdale_xspi_platform_data, |
495 | .data_size = sizeof(timberdale_xspi_platform_data), | ||
496 | }, | 483 | }, |
497 | { | 484 | { |
498 | .name = "ks8842", | 485 | .name = "ks8842", |
499 | .num_resources = ARRAY_SIZE(timberdale_eth_resources), | 486 | .num_resources = ARRAY_SIZE(timberdale_eth_resources), |
500 | .resources = timberdale_eth_resources, | 487 | .resources = timberdale_eth_resources, |
501 | .platform_data = &timberdale_ks8842_platform_data, | 488 | .platform_data = &timberdale_ks8842_platform_data, |
502 | .data_size = sizeof(timberdale_ks8842_platform_data) | ||
503 | }, | 489 | }, |
504 | }; | 490 | }; |
505 | 491 | ||
@@ -509,7 +495,6 @@ static __devinitdata struct mfd_cell timberdale_cells_bar0_cfg2[] = { | |||
509 | .num_resources = ARRAY_SIZE(timberdale_dma_resources), | 495 | .num_resources = ARRAY_SIZE(timberdale_dma_resources), |
510 | .resources = timberdale_dma_resources, | 496 | .resources = timberdale_dma_resources, |
511 | .platform_data = &timb_dma_platform_data, | 497 | .platform_data = &timb_dma_platform_data, |
512 | .data_size = sizeof(timb_dma_platform_data), | ||
513 | }, | 498 | }, |
514 | { | 499 | { |
515 | .name = "timb-uart", | 500 | .name = "timb-uart", |
@@ -521,35 +506,30 @@ static __devinitdata struct mfd_cell timberdale_cells_bar0_cfg2[] = { | |||
521 | .num_resources = ARRAY_SIZE(timberdale_xiic_resources), | 506 | .num_resources = ARRAY_SIZE(timberdale_xiic_resources), |
522 | .resources = timberdale_xiic_resources, | 507 | .resources = timberdale_xiic_resources, |
523 | .platform_data = &timberdale_xiic_platform_data, | 508 | .platform_data = &timberdale_xiic_platform_data, |
524 | .data_size = sizeof(timberdale_xiic_platform_data), | ||
525 | }, | 509 | }, |
526 | { | 510 | { |
527 | .name = "timb-gpio", | 511 | .name = "timb-gpio", |
528 | .num_resources = ARRAY_SIZE(timberdale_gpio_resources), | 512 | .num_resources = ARRAY_SIZE(timberdale_gpio_resources), |
529 | .resources = timberdale_gpio_resources, | 513 | .resources = timberdale_gpio_resources, |
530 | .platform_data = &timberdale_gpio_platform_data, | 514 | .platform_data = &timberdale_gpio_platform_data, |
531 | .data_size = sizeof(timberdale_gpio_platform_data), | ||
532 | }, | 515 | }, |
533 | { | 516 | { |
534 | .name = "timb-video", | 517 | .name = "timb-video", |
535 | .num_resources = ARRAY_SIZE(timberdale_video_resources), | 518 | .num_resources = ARRAY_SIZE(timberdale_video_resources), |
536 | .resources = timberdale_video_resources, | 519 | .resources = timberdale_video_resources, |
537 | .platform_data = &timberdale_video_platform_data, | 520 | .platform_data = &timberdale_video_platform_data, |
538 | .data_size = sizeof(timberdale_video_platform_data), | ||
539 | }, | 521 | }, |
540 | { | 522 | { |
541 | .name = "timb-radio", | 523 | .name = "timb-radio", |
542 | .num_resources = ARRAY_SIZE(timberdale_radio_resources), | 524 | .num_resources = ARRAY_SIZE(timberdale_radio_resources), |
543 | .resources = timberdale_radio_resources, | 525 | .resources = timberdale_radio_resources, |
544 | .platform_data = &timberdale_radio_platform_data, | 526 | .platform_data = &timberdale_radio_platform_data, |
545 | .data_size = sizeof(timberdale_radio_platform_data), | ||
546 | }, | 527 | }, |
547 | { | 528 | { |
548 | .name = "xilinx_spi", | 529 | .name = "xilinx_spi", |
549 | .num_resources = ARRAY_SIZE(timberdale_spi_resources), | 530 | .num_resources = ARRAY_SIZE(timberdale_spi_resources), |
550 | .resources = timberdale_spi_resources, | 531 | .resources = timberdale_spi_resources, |
551 | .platform_data = &timberdale_xspi_platform_data, | 532 | .platform_data = &timberdale_xspi_platform_data, |
552 | .data_size = sizeof(timberdale_xspi_platform_data), | ||
553 | }, | 533 | }, |
554 | }; | 534 | }; |
555 | 535 | ||
@@ -559,7 +539,6 @@ static __devinitdata struct mfd_cell timberdale_cells_bar0_cfg3[] = { | |||
559 | .num_resources = ARRAY_SIZE(timberdale_dma_resources), | 539 | .num_resources = ARRAY_SIZE(timberdale_dma_resources), |
560 | .resources = timberdale_dma_resources, | 540 | .resources = timberdale_dma_resources, |
561 | .platform_data = &timb_dma_platform_data, | 541 | .platform_data = &timb_dma_platform_data, |
562 | .data_size = sizeof(timb_dma_platform_data), | ||
563 | }, | 542 | }, |
564 | { | 543 | { |
565 | .name = "timb-uart", | 544 | .name = "timb-uart", |
@@ -571,42 +550,36 @@ static __devinitdata struct mfd_cell timberdale_cells_bar0_cfg3[] = { | |||
571 | .num_resources = ARRAY_SIZE(timberdale_ocores_resources), | 550 | .num_resources = ARRAY_SIZE(timberdale_ocores_resources), |
572 | .resources = timberdale_ocores_resources, | 551 | .resources = timberdale_ocores_resources, |
573 | .platform_data = &timberdale_ocores_platform_data, | 552 | .platform_data = &timberdale_ocores_platform_data, |
574 | .data_size = sizeof(timberdale_ocores_platform_data), | ||
575 | }, | 553 | }, |
576 | { | 554 | { |
577 | .name = "timb-gpio", | 555 | .name = "timb-gpio", |
578 | .num_resources = ARRAY_SIZE(timberdale_gpio_resources), | 556 | .num_resources = ARRAY_SIZE(timberdale_gpio_resources), |
579 | .resources = timberdale_gpio_resources, | 557 | .resources = timberdale_gpio_resources, |
580 | .platform_data = &timberdale_gpio_platform_data, | 558 | .platform_data = &timberdale_gpio_platform_data, |
581 | .data_size = sizeof(timberdale_gpio_platform_data), | ||
582 | }, | 559 | }, |
583 | { | 560 | { |
584 | .name = "timb-video", | 561 | .name = "timb-video", |
585 | .num_resources = ARRAY_SIZE(timberdale_video_resources), | 562 | .num_resources = ARRAY_SIZE(timberdale_video_resources), |
586 | .resources = timberdale_video_resources, | 563 | .resources = timberdale_video_resources, |
587 | .platform_data = &timberdale_video_platform_data, | 564 | .platform_data = &timberdale_video_platform_data, |
588 | .data_size = sizeof(timberdale_video_platform_data), | ||
589 | }, | 565 | }, |
590 | { | 566 | { |
591 | .name = "timb-radio", | 567 | .name = "timb-radio", |
592 | .num_resources = ARRAY_SIZE(timberdale_radio_resources), | 568 | .num_resources = ARRAY_SIZE(timberdale_radio_resources), |
593 | .resources = timberdale_radio_resources, | 569 | .resources = timberdale_radio_resources, |
594 | .platform_data = &timberdale_radio_platform_data, | 570 | .platform_data = &timberdale_radio_platform_data, |
595 | .data_size = sizeof(timberdale_radio_platform_data), | ||
596 | }, | 571 | }, |
597 | { | 572 | { |
598 | .name = "xilinx_spi", | 573 | .name = "xilinx_spi", |
599 | .num_resources = ARRAY_SIZE(timberdale_spi_resources), | 574 | .num_resources = ARRAY_SIZE(timberdale_spi_resources), |
600 | .resources = timberdale_spi_resources, | 575 | .resources = timberdale_spi_resources, |
601 | .platform_data = &timberdale_xspi_platform_data, | 576 | .platform_data = &timberdale_xspi_platform_data, |
602 | .data_size = sizeof(timberdale_xspi_platform_data), | ||
603 | }, | 577 | }, |
604 | { | 578 | { |
605 | .name = "ks8842", | 579 | .name = "ks8842", |
606 | .num_resources = ARRAY_SIZE(timberdale_eth_resources), | 580 | .num_resources = ARRAY_SIZE(timberdale_eth_resources), |
607 | .resources = timberdale_eth_resources, | 581 | .resources = timberdale_eth_resources, |
608 | .platform_data = &timberdale_ks8842_platform_data, | 582 | .platform_data = &timberdale_ks8842_platform_data, |
609 | .data_size = sizeof(timberdale_ks8842_platform_data) | ||
610 | }, | 583 | }, |
611 | }; | 584 | }; |
612 | 585 | ||
diff --git a/drivers/net/ks8842.c b/drivers/net/ks8842.c index 928b2b83cef5..efd44afeae83 100644 --- a/drivers/net/ks8842.c +++ b/drivers/net/ks8842.c | |||
@@ -26,6 +26,7 @@ | |||
26 | #include <linux/kernel.h> | 26 | #include <linux/kernel.h> |
27 | #include <linux/module.h> | 27 | #include <linux/module.h> |
28 | #include <linux/platform_device.h> | 28 | #include <linux/platform_device.h> |
29 | #include <linux/mfd/core.h> | ||
29 | #include <linux/netdevice.h> | 30 | #include <linux/netdevice.h> |
30 | #include <linux/etherdevice.h> | 31 | #include <linux/etherdevice.h> |
31 | #include <linux/ethtool.h> | 32 | #include <linux/ethtool.h> |
@@ -1145,7 +1146,7 @@ static int __devinit ks8842_probe(struct platform_device *pdev) | |||
1145 | struct resource *iomem; | 1146 | struct resource *iomem; |
1146 | struct net_device *netdev; | 1147 | struct net_device *netdev; |
1147 | struct ks8842_adapter *adapter; | 1148 | struct ks8842_adapter *adapter; |
1148 | struct ks8842_platform_data *pdata = pdev->dev.platform_data; | 1149 | struct ks8842_platform_data *pdata = mfd_get_data(pdev); |
1149 | u16 id; | 1150 | u16 id; |
1150 | unsigned i; | 1151 | unsigned i; |
1151 | 1152 | ||
diff --git a/drivers/spi/xilinx_spi.c b/drivers/spi/xilinx_spi.c index 4d2c75df886c..c69c6f2c2c5c 100644 --- a/drivers/spi/xilinx_spi.c +++ b/drivers/spi/xilinx_spi.c | |||
@@ -18,6 +18,7 @@ | |||
18 | #include <linux/interrupt.h> | 18 | #include <linux/interrupt.h> |
19 | #include <linux/of.h> | 19 | #include <linux/of.h> |
20 | #include <linux/platform_device.h> | 20 | #include <linux/platform_device.h> |
21 | #include <linux/mfd/core.h> | ||
21 | #include <linux/spi/spi.h> | 22 | #include <linux/spi/spi.h> |
22 | #include <linux/spi/spi_bitbang.h> | 23 | #include <linux/spi/spi_bitbang.h> |
23 | #include <linux/spi/xilinx_spi.h> | 24 | #include <linux/spi/xilinx_spi.h> |
@@ -470,7 +471,7 @@ static int __devinit xilinx_spi_probe(struct platform_device *dev) | |||
470 | struct spi_master *master; | 471 | struct spi_master *master; |
471 | u8 i; | 472 | u8 i; |
472 | 473 | ||
473 | pdata = dev->dev.platform_data; | 474 | pdata = mfd_get_data(dev); |
474 | if (pdata) { | 475 | if (pdata) { |
475 | num_cs = pdata->num_chipselect; | 476 | num_cs = pdata->num_chipselect; |
476 | little_endian = pdata->little_endian; | 477 | little_endian = pdata->little_endian; |