diff options
Diffstat (limited to 'drivers/spi')
29 files changed, 40 insertions, 38 deletions
diff --git a/drivers/spi/spi-altera.c b/drivers/spi/spi-altera.c index 8a6bb37910da..5f84e0f3f4a4 100644 --- a/drivers/spi/spi-altera.c +++ b/drivers/spi/spi-altera.c | |||
@@ -207,7 +207,7 @@ static irqreturn_t altera_spi_irq(int irq, void *dev) | |||
207 | 207 | ||
208 | static int altera_spi_probe(struct platform_device *pdev) | 208 | static int altera_spi_probe(struct platform_device *pdev) |
209 | { | 209 | { |
210 | struct altera_spi_platform_data *platp = pdev->dev.platform_data; | 210 | struct altera_spi_platform_data *platp = dev_get_platdata(&pdev->dev); |
211 | struct altera_spi *hw; | 211 | struct altera_spi *hw; |
212 | struct spi_master *master; | 212 | struct spi_master *master; |
213 | struct resource *res; | 213 | struct resource *res; |
diff --git a/drivers/spi/spi-ath79.c b/drivers/spi/spi-ath79.c index 0e06407a4670..37bad952ab38 100644 --- a/drivers/spi/spi-ath79.c +++ b/drivers/spi/spi-ath79.c | |||
@@ -221,7 +221,7 @@ static int ath79_spi_probe(struct platform_device *pdev) | |||
221 | sp = spi_master_get_devdata(master); | 221 | sp = spi_master_get_devdata(master); |
222 | platform_set_drvdata(pdev, sp); | 222 | platform_set_drvdata(pdev, sp); |
223 | 223 | ||
224 | pdata = pdev->dev.platform_data; | 224 | pdata = dev_get_platdata(&pdev->dev); |
225 | 225 | ||
226 | master->bits_per_word_mask = SPI_BPW_RANGE_MASK(1, 32); | 226 | master->bits_per_word_mask = SPI_BPW_RANGE_MASK(1, 32); |
227 | master->setup = ath79_spi_setup; | 227 | master->setup = ath79_spi_setup; |
diff --git a/drivers/spi/spi-au1550.c b/drivers/spi/spi-au1550.c index e1965553ab79..1d00d9b397dd 100644 --- a/drivers/spi/spi-au1550.c +++ b/drivers/spi/spi-au1550.c | |||
@@ -776,7 +776,7 @@ static int au1550_spi_probe(struct platform_device *pdev) | |||
776 | hw = spi_master_get_devdata(master); | 776 | hw = spi_master_get_devdata(master); |
777 | 777 | ||
778 | hw->master = spi_master_get(master); | 778 | hw->master = spi_master_get(master); |
779 | hw->pdata = pdev->dev.platform_data; | 779 | hw->pdata = dev_get_platdata(&pdev->dev); |
780 | hw->dev = &pdev->dev; | 780 | hw->dev = &pdev->dev; |
781 | 781 | ||
782 | if (hw->pdata == NULL) { | 782 | if (hw->pdata == NULL) { |
diff --git a/drivers/spi/spi-bcm63xx.c b/drivers/spi/spi-bcm63xx.c index 9fd7a39b8029..6d0df500aa8f 100644 --- a/drivers/spi/spi-bcm63xx.c +++ b/drivers/spi/spi-bcm63xx.c | |||
@@ -353,7 +353,7 @@ static int bcm63xx_spi_probe(struct platform_device *pdev) | |||
353 | { | 353 | { |
354 | struct resource *r; | 354 | struct resource *r; |
355 | struct device *dev = &pdev->dev; | 355 | struct device *dev = &pdev->dev; |
356 | struct bcm63xx_spi_pdata *pdata = pdev->dev.platform_data; | 356 | struct bcm63xx_spi_pdata *pdata = dev_get_platdata(&pdev->dev); |
357 | int irq; | 357 | int irq; |
358 | struct spi_master *master; | 358 | struct spi_master *master; |
359 | struct clk *clk; | 359 | struct clk *clk; |
diff --git a/drivers/spi/spi-bfin-sport.c b/drivers/spi/spi-bfin-sport.c index 07ec597f9732..91921b5f5817 100644 --- a/drivers/spi/spi-bfin-sport.c +++ b/drivers/spi/spi-bfin-sport.c | |||
@@ -756,7 +756,7 @@ static int bfin_sport_spi_probe(struct platform_device *pdev) | |||
756 | struct bfin_sport_spi_master_data *drv_data; | 756 | struct bfin_sport_spi_master_data *drv_data; |
757 | int status; | 757 | int status; |
758 | 758 | ||
759 | platform_info = dev->platform_data; | 759 | platform_info = dev_get_platdata(dev); |
760 | 760 | ||
761 | /* Allocate master with space for drv_data */ | 761 | /* Allocate master with space for drv_data */ |
762 | master = spi_alloc_master(dev, sizeof(*master) + 16); | 762 | master = spi_alloc_master(dev, sizeof(*master) + 16); |
diff --git a/drivers/spi/spi-bfin-v3.c b/drivers/spi/spi-bfin-v3.c index 914f9fe1ec99..35f2db72af92 100644 --- a/drivers/spi/spi-bfin-v3.c +++ b/drivers/spi/spi-bfin-v3.c | |||
@@ -773,7 +773,7 @@ static irqreturn_t bfin_spi_rx_dma_isr(int irq, void *dev_id) | |||
773 | static int bfin_spi_probe(struct platform_device *pdev) | 773 | static int bfin_spi_probe(struct platform_device *pdev) |
774 | { | 774 | { |
775 | struct device *dev = &pdev->dev; | 775 | struct device *dev = &pdev->dev; |
776 | struct bfin_spi3_master *info = dev->platform_data; | 776 | struct bfin_spi3_master *info = dev_get_platdata(dev); |
777 | struct spi_master *master; | 777 | struct spi_master *master; |
778 | struct bfin_spi_master *drv_data; | 778 | struct bfin_spi_master *drv_data; |
779 | struct resource *mem, *res; | 779 | struct resource *mem, *res; |
diff --git a/drivers/spi/spi-bfin5xx.c b/drivers/spi/spi-bfin5xx.c index 59a73424419c..45bdf73d6868 100644 --- a/drivers/spi/spi-bfin5xx.c +++ b/drivers/spi/spi-bfin5xx.c | |||
@@ -1271,7 +1271,7 @@ static int bfin_spi_probe(struct platform_device *pdev) | |||
1271 | struct resource *res; | 1271 | struct resource *res; |
1272 | int status = 0; | 1272 | int status = 0; |
1273 | 1273 | ||
1274 | platform_info = dev->platform_data; | 1274 | platform_info = dev_get_platdata(dev); |
1275 | 1275 | ||
1276 | /* Allocate master with space for drv_data */ | 1276 | /* Allocate master with space for drv_data */ |
1277 | master = spi_alloc_master(dev, sizeof(*drv_data)); | 1277 | master = spi_alloc_master(dev, sizeof(*drv_data)); |
diff --git a/drivers/spi/spi-coldfire-qspi.c b/drivers/spi/spi-coldfire-qspi.c index 0631b9d4a5de..1381acbe19c5 100644 --- a/drivers/spi/spi-coldfire-qspi.c +++ b/drivers/spi/spi-coldfire-qspi.c | |||
@@ -400,7 +400,7 @@ static int mcfqspi_probe(struct platform_device *pdev) | |||
400 | struct mcfqspi_platform_data *pdata; | 400 | struct mcfqspi_platform_data *pdata; |
401 | int status; | 401 | int status; |
402 | 402 | ||
403 | pdata = pdev->dev.platform_data; | 403 | pdata = dev_get_platdata(&pdev->dev); |
404 | if (!pdata) { | 404 | if (!pdata) { |
405 | dev_dbg(&pdev->dev, "platform data is missing\n"); | 405 | dev_dbg(&pdev->dev, "platform data is missing\n"); |
406 | return -ENOENT; | 406 | return -ENOENT; |
diff --git a/drivers/spi/spi-davinci.c b/drivers/spi/spi-davinci.c index 222d3e37fc28..5cd6398e970e 100644 --- a/drivers/spi/spi-davinci.c +++ b/drivers/spi/spi-davinci.c | |||
@@ -872,8 +872,8 @@ static int davinci_spi_probe(struct platform_device *pdev) | |||
872 | goto free_master; | 872 | goto free_master; |
873 | } | 873 | } |
874 | 874 | ||
875 | if (pdev->dev.platform_data) { | 875 | if (dev_get_platdata(&pdev->dev)) { |
876 | pdata = pdev->dev.platform_data; | 876 | pdata = dev_get_platdata(&pdev->dev); |
877 | dspi->pdata = *pdata; | 877 | dspi->pdata = *pdata; |
878 | } else { | 878 | } else { |
879 | /* update dspi pdata with that from the DT */ | 879 | /* update dspi pdata with that from the DT */ |
diff --git a/drivers/spi/spi-ep93xx.c b/drivers/spi/spi-ep93xx.c index cad30b8a1d71..50831c837677 100644 --- a/drivers/spi/spi-ep93xx.c +++ b/drivers/spi/spi-ep93xx.c | |||
@@ -1022,7 +1022,7 @@ static int ep93xx_spi_probe(struct platform_device *pdev) | |||
1022 | int irq; | 1022 | int irq; |
1023 | int error; | 1023 | int error; |
1024 | 1024 | ||
1025 | info = pdev->dev.platform_data; | 1025 | info = dev_get_platdata(&pdev->dev); |
1026 | 1026 | ||
1027 | master = spi_alloc_master(&pdev->dev, sizeof(*espi)); | 1027 | master = spi_alloc_master(&pdev->dev, sizeof(*espi)); |
1028 | if (!master) { | 1028 | if (!master) { |
diff --git a/drivers/spi/spi-fsl-espi.c b/drivers/spi/spi-fsl-espi.c index 6a74d7848d93..b8f1103fe28e 100644 --- a/drivers/spi/spi-fsl-espi.c +++ b/drivers/spi/spi-fsl-espi.c | |||
@@ -584,7 +584,7 @@ static void fsl_espi_remove(struct mpc8xxx_spi *mspi) | |||
584 | static struct spi_master * fsl_espi_probe(struct device *dev, | 584 | static struct spi_master * fsl_espi_probe(struct device *dev, |
585 | struct resource *mem, unsigned int irq) | 585 | struct resource *mem, unsigned int irq) |
586 | { | 586 | { |
587 | struct fsl_spi_platform_data *pdata = dev->platform_data; | 587 | struct fsl_spi_platform_data *pdata = dev_get_platdata(dev); |
588 | struct spi_master *master; | 588 | struct spi_master *master; |
589 | struct mpc8xxx_spi *mpc8xxx_spi; | 589 | struct mpc8xxx_spi *mpc8xxx_spi; |
590 | struct fsl_espi_reg *reg_base; | 590 | struct fsl_espi_reg *reg_base; |
@@ -665,7 +665,7 @@ err: | |||
665 | static int of_fsl_espi_get_chipselects(struct device *dev) | 665 | static int of_fsl_espi_get_chipselects(struct device *dev) |
666 | { | 666 | { |
667 | struct device_node *np = dev->of_node; | 667 | struct device_node *np = dev->of_node; |
668 | struct fsl_spi_platform_data *pdata = dev->platform_data; | 668 | struct fsl_spi_platform_data *pdata = dev_get_platdata(dev); |
669 | const u32 *prop; | 669 | const u32 *prop; |
670 | int len; | 670 | int len; |
671 | 671 | ||
diff --git a/drivers/spi/spi-fsl-lib.c b/drivers/spi/spi-fsl-lib.c index e947f2d1b2f5..0b75f26158ab 100644 --- a/drivers/spi/spi-fsl-lib.c +++ b/drivers/spi/spi-fsl-lib.c | |||
@@ -122,7 +122,7 @@ const char *mpc8xxx_spi_strmode(unsigned int flags) | |||
122 | int mpc8xxx_spi_probe(struct device *dev, struct resource *mem, | 122 | int mpc8xxx_spi_probe(struct device *dev, struct resource *mem, |
123 | unsigned int irq) | 123 | unsigned int irq) |
124 | { | 124 | { |
125 | struct fsl_spi_platform_data *pdata = dev->platform_data; | 125 | struct fsl_spi_platform_data *pdata = dev_get_platdata(dev); |
126 | struct spi_master *master; | 126 | struct spi_master *master; |
127 | struct mpc8xxx_spi *mpc8xxx_spi; | 127 | struct mpc8xxx_spi *mpc8xxx_spi; |
128 | int ret = 0; | 128 | int ret = 0; |
diff --git a/drivers/spi/spi-fsl-spi.c b/drivers/spi/spi-fsl-spi.c index 41e89c3e3edc..bbc94294891c 100644 --- a/drivers/spi/spi-fsl-spi.c +++ b/drivers/spi/spi-fsl-spi.c | |||
@@ -574,7 +574,7 @@ static void fsl_spi_grlib_cs_control(struct spi_device *spi, bool on) | |||
574 | 574 | ||
575 | static void fsl_spi_grlib_probe(struct device *dev) | 575 | static void fsl_spi_grlib_probe(struct device *dev) |
576 | { | 576 | { |
577 | struct fsl_spi_platform_data *pdata = dev->platform_data; | 577 | struct fsl_spi_platform_data *pdata = dev_get_platdata(dev); |
578 | struct spi_master *master = dev_get_drvdata(dev); | 578 | struct spi_master *master = dev_get_drvdata(dev); |
579 | struct mpc8xxx_spi *mpc8xxx_spi = spi_master_get_devdata(master); | 579 | struct mpc8xxx_spi *mpc8xxx_spi = spi_master_get_devdata(master); |
580 | struct fsl_spi_reg *reg_base = mpc8xxx_spi->reg_base; | 580 | struct fsl_spi_reg *reg_base = mpc8xxx_spi->reg_base; |
@@ -600,7 +600,7 @@ static void fsl_spi_grlib_probe(struct device *dev) | |||
600 | static struct spi_master * fsl_spi_probe(struct device *dev, | 600 | static struct spi_master * fsl_spi_probe(struct device *dev, |
601 | struct resource *mem, unsigned int irq) | 601 | struct resource *mem, unsigned int irq) |
602 | { | 602 | { |
603 | struct fsl_spi_platform_data *pdata = dev->platform_data; | 603 | struct fsl_spi_platform_data *pdata = dev_get_platdata(dev); |
604 | struct spi_master *master; | 604 | struct spi_master *master; |
605 | struct mpc8xxx_spi *mpc8xxx_spi; | 605 | struct mpc8xxx_spi *mpc8xxx_spi; |
606 | struct fsl_spi_reg *reg_base; | 606 | struct fsl_spi_reg *reg_base; |
@@ -700,7 +700,8 @@ err: | |||
700 | static void fsl_spi_cs_control(struct spi_device *spi, bool on) | 700 | static void fsl_spi_cs_control(struct spi_device *spi, bool on) |
701 | { | 701 | { |
702 | struct device *dev = spi->dev.parent->parent; | 702 | struct device *dev = spi->dev.parent->parent; |
703 | struct mpc8xxx_spi_probe_info *pinfo = to_of_pinfo(dev->platform_data); | 703 | struct fsl_spi_platform_data *pdata = dev_get_platdata(dev); |
704 | struct mpc8xxx_spi_probe_info *pinfo = to_of_pinfo(pdata); | ||
704 | u16 cs = spi->chip_select; | 705 | u16 cs = spi->chip_select; |
705 | int gpio = pinfo->gpios[cs]; | 706 | int gpio = pinfo->gpios[cs]; |
706 | bool alow = pinfo->alow_flags[cs]; | 707 | bool alow = pinfo->alow_flags[cs]; |
@@ -711,7 +712,7 @@ static void fsl_spi_cs_control(struct spi_device *spi, bool on) | |||
711 | static int of_fsl_spi_get_chipselects(struct device *dev) | 712 | static int of_fsl_spi_get_chipselects(struct device *dev) |
712 | { | 713 | { |
713 | struct device_node *np = dev->of_node; | 714 | struct device_node *np = dev->of_node; |
714 | struct fsl_spi_platform_data *pdata = dev->platform_data; | 715 | struct fsl_spi_platform_data *pdata = dev_get_platdata(dev); |
715 | struct mpc8xxx_spi_probe_info *pinfo = to_of_pinfo(pdata); | 716 | struct mpc8xxx_spi_probe_info *pinfo = to_of_pinfo(pdata); |
716 | int ngpios; | 717 | int ngpios; |
717 | int i = 0; | 718 | int i = 0; |
@@ -790,7 +791,7 @@ err_alloc_flags: | |||
790 | 791 | ||
791 | static int of_fsl_spi_free_chipselects(struct device *dev) | 792 | static int of_fsl_spi_free_chipselects(struct device *dev) |
792 | { | 793 | { |
793 | struct fsl_spi_platform_data *pdata = dev->platform_data; | 794 | struct fsl_spi_platform_data *pdata = dev_get_platdata(dev); |
794 | struct mpc8xxx_spi_probe_info *pinfo = to_of_pinfo(pdata); | 795 | struct mpc8xxx_spi_probe_info *pinfo = to_of_pinfo(pdata); |
795 | int i; | 796 | int i; |
796 | 797 | ||
@@ -889,7 +890,7 @@ static int plat_mpc8xxx_spi_probe(struct platform_device *pdev) | |||
889 | int irq; | 890 | int irq; |
890 | struct spi_master *master; | 891 | struct spi_master *master; |
891 | 892 | ||
892 | if (!pdev->dev.platform_data) | 893 | if (!dev_get_platdata(&pdev->dev)) |
893 | return -EINVAL; | 894 | return -EINVAL; |
894 | 895 | ||
895 | mem = platform_get_resource(pdev, IORESOURCE_MEM, 0); | 896 | mem = platform_get_resource(pdev, IORESOURCE_MEM, 0); |
diff --git a/drivers/spi/spi-gpio.c b/drivers/spi/spi-gpio.c index a54524cf42cc..68b69fec13a9 100644 --- a/drivers/spi/spi-gpio.c +++ b/drivers/spi/spi-gpio.c | |||
@@ -420,7 +420,7 @@ static int spi_gpio_probe(struct platform_device *pdev) | |||
420 | if (status > 0) | 420 | if (status > 0) |
421 | use_of = 1; | 421 | use_of = 1; |
422 | 422 | ||
423 | pdata = pdev->dev.platform_data; | 423 | pdata = dev_get_platdata(&pdev->dev); |
424 | #ifdef GENERIC_BITBANG | 424 | #ifdef GENERIC_BITBANG |
425 | if (!pdata || !pdata->num_chipselect) | 425 | if (!pdata || !pdata->num_chipselect) |
426 | return -ENODEV; | 426 | return -ENODEV; |
@@ -506,7 +506,7 @@ static int spi_gpio_remove(struct platform_device *pdev) | |||
506 | int status; | 506 | int status; |
507 | 507 | ||
508 | spi_gpio = platform_get_drvdata(pdev); | 508 | spi_gpio = platform_get_drvdata(pdev); |
509 | pdata = pdev->dev.platform_data; | 509 | pdata = dev_get_platdata(&pdev->dev); |
510 | 510 | ||
511 | /* stop() unregisters child devices too */ | 511 | /* stop() unregisters child devices too */ |
512 | status = spi_bitbang_stop(&spi_gpio->bitbang); | 512 | status = spi_bitbang_stop(&spi_gpio->bitbang); |
diff --git a/drivers/spi/spi-mpc512x-psc.c b/drivers/spi/spi-mpc512x-psc.c index 29fce6af5145..de0976cf0ae2 100644 --- a/drivers/spi/spi-mpc512x-psc.c +++ b/drivers/spi/spi-mpc512x-psc.c | |||
@@ -474,7 +474,7 @@ static int mpc512x_psc_spi_do_probe(struct device *dev, u32 regaddr, | |||
474 | u32 size, unsigned int irq, | 474 | u32 size, unsigned int irq, |
475 | s16 bus_num) | 475 | s16 bus_num) |
476 | { | 476 | { |
477 | struct fsl_spi_platform_data *pdata = dev->platform_data; | 477 | struct fsl_spi_platform_data *pdata = dev_get_platdata(dev); |
478 | struct mpc512x_psc_spi *mps; | 478 | struct mpc512x_psc_spi *mps; |
479 | struct spi_master *master; | 479 | struct spi_master *master; |
480 | int ret; | 480 | int ret; |
diff --git a/drivers/spi/spi-mpc52xx-psc.c b/drivers/spi/spi-mpc52xx-psc.c index fed0571d4dec..6e925dc34396 100644 --- a/drivers/spi/spi-mpc52xx-psc.c +++ b/drivers/spi/spi-mpc52xx-psc.c | |||
@@ -366,7 +366,7 @@ static irqreturn_t mpc52xx_psc_spi_isr(int irq, void *dev_id) | |||
366 | static int mpc52xx_psc_spi_do_probe(struct device *dev, u32 regaddr, | 366 | static int mpc52xx_psc_spi_do_probe(struct device *dev, u32 regaddr, |
367 | u32 size, unsigned int irq, s16 bus_num) | 367 | u32 size, unsigned int irq, s16 bus_num) |
368 | { | 368 | { |
369 | struct fsl_spi_platform_data *pdata = dev->platform_data; | 369 | struct fsl_spi_platform_data *pdata = dev_get_platdata(dev); |
370 | struct mpc52xx_psc_spi *mps; | 370 | struct mpc52xx_psc_spi *mps; |
371 | struct spi_master *master; | 371 | struct spi_master *master; |
372 | int ret; | 372 | int ret; |
diff --git a/drivers/spi/spi-nuc900.c b/drivers/spi/spi-nuc900.c index 2ad3d74ac021..d98244bb4c6c 100644 --- a/drivers/spi/spi-nuc900.c +++ b/drivers/spi/spi-nuc900.c | |||
@@ -350,7 +350,7 @@ static int nuc900_spi_probe(struct platform_device *pdev) | |||
350 | 350 | ||
351 | hw = spi_master_get_devdata(master); | 351 | hw = spi_master_get_devdata(master); |
352 | hw->master = spi_master_get(master); | 352 | hw->master = spi_master_get(master); |
353 | hw->pdata = pdev->dev.platform_data; | 353 | hw->pdata = dev_get_platdata(&pdev->dev); |
354 | hw->dev = &pdev->dev; | 354 | hw->dev = &pdev->dev; |
355 | 355 | ||
356 | if (hw->pdata == NULL) { | 356 | if (hw->pdata == NULL) { |
diff --git a/drivers/spi/spi-oc-tiny.c b/drivers/spi/spi-oc-tiny.c index 58deb79d046b..8de5056c4ade 100644 --- a/drivers/spi/spi-oc-tiny.c +++ b/drivers/spi/spi-oc-tiny.c | |||
@@ -285,7 +285,7 @@ static int tiny_spi_of_probe(struct platform_device *pdev) | |||
285 | 285 | ||
286 | static int tiny_spi_probe(struct platform_device *pdev) | 286 | static int tiny_spi_probe(struct platform_device *pdev) |
287 | { | 287 | { |
288 | struct tiny_spi_platform_data *platp = pdev->dev.platform_data; | 288 | struct tiny_spi_platform_data *platp = dev_get_platdata(&pdev->dev); |
289 | struct tiny_spi *hw; | 289 | struct tiny_spi *hw; |
290 | struct spi_master *master; | 290 | struct spi_master *master; |
291 | struct resource *res; | 291 | struct resource *res; |
diff --git a/drivers/spi/spi-omap-100k.c b/drivers/spi/spi-omap-100k.c index ee25670f8cfd..b0e1d88f1635 100644 --- a/drivers/spi/spi-omap-100k.c +++ b/drivers/spi/spi-omap-100k.c | |||
@@ -512,7 +512,7 @@ static int omap1_spi100k_probe(struct platform_device *pdev) | |||
512 | * You should allocate this with ioremap() before initializing | 512 | * You should allocate this with ioremap() before initializing |
513 | * the SPI. | 513 | * the SPI. |
514 | */ | 514 | */ |
515 | spi100k->base = (void __iomem *) pdev->dev.platform_data; | 515 | spi100k->base = (void __iomem *)dev_get_platdata(&pdev->dev); |
516 | 516 | ||
517 | INIT_WORK(&spi100k->work, omap1_spi100k_work); | 517 | INIT_WORK(&spi100k->work, omap1_spi100k_work); |
518 | 518 | ||
diff --git a/drivers/spi/spi-omap2-mcspi.c b/drivers/spi/spi-omap2-mcspi.c index 5994039758de..fc190a5a0bad 100644 --- a/drivers/spi/spi-omap2-mcspi.c +++ b/drivers/spi/spi-omap2-mcspi.c | |||
@@ -1340,7 +1340,7 @@ static int omap2_mcspi_probe(struct platform_device *pdev) | |||
1340 | if (of_get_property(node, "ti,pindir-d0-out-d1-in", NULL)) | 1340 | if (of_get_property(node, "ti,pindir-d0-out-d1-in", NULL)) |
1341 | mcspi->pin_dir = MCSPI_PINDIR_D0_OUT_D1_IN; | 1341 | mcspi->pin_dir = MCSPI_PINDIR_D0_OUT_D1_IN; |
1342 | } else { | 1342 | } else { |
1343 | pdata = pdev->dev.platform_data; | 1343 | pdata = dev_get_platdata(&pdev->dev); |
1344 | master->num_chipselect = pdata->num_cs; | 1344 | master->num_chipselect = pdata->num_cs; |
1345 | if (pdev->id != -1) | 1345 | if (pdev->id != -1) |
1346 | master->bus_num = pdev->id; | 1346 | master->bus_num = pdev->id; |
diff --git a/drivers/spi/spi-pl022.c b/drivers/spi/spi-pl022.c index abef061fb84a..4b564b74c99c 100644 --- a/drivers/spi/spi-pl022.c +++ b/drivers/spi/spi-pl022.c | |||
@@ -2091,7 +2091,8 @@ pl022_platform_data_dt_get(struct device *dev) | |||
2091 | static int pl022_probe(struct amba_device *adev, const struct amba_id *id) | 2091 | static int pl022_probe(struct amba_device *adev, const struct amba_id *id) |
2092 | { | 2092 | { |
2093 | struct device *dev = &adev->dev; | 2093 | struct device *dev = &adev->dev; |
2094 | struct pl022_ssp_controller *platform_info = adev->dev.platform_data; | 2094 | struct pl022_ssp_controller *platform_info = |
2095 | dev_get_platdata(&adev->dev); | ||
2095 | struct spi_master *master; | 2096 | struct spi_master *master; |
2096 | struct pl022 *pl022 = NULL; /*Data for this driver */ | 2097 | struct pl022 *pl022 = NULL; /*Data for this driver */ |
2097 | struct device_node *np = adev->dev.of_node; | 2098 | struct device_node *np = adev->dev.of_node; |
diff --git a/drivers/spi/spi-rspi.c b/drivers/spi/spi-rspi.c index b44a6ac3cec9..aa5fc52abd04 100644 --- a/drivers/spi/spi-rspi.c +++ b/drivers/spi/spi-rspi.c | |||
@@ -664,7 +664,7 @@ static irqreturn_t rspi_irq(int irq, void *_sr) | |||
664 | static int rspi_request_dma(struct rspi_data *rspi, | 664 | static int rspi_request_dma(struct rspi_data *rspi, |
665 | struct platform_device *pdev) | 665 | struct platform_device *pdev) |
666 | { | 666 | { |
667 | struct rspi_plat_data *rspi_pd = pdev->dev.platform_data; | 667 | struct rspi_plat_data *rspi_pd = dev_get_platdata(&pdev->dev); |
668 | dma_cap_mask_t mask; | 668 | dma_cap_mask_t mask; |
669 | struct dma_slave_config cfg; | 669 | struct dma_slave_config cfg; |
670 | int ret; | 670 | int ret; |
diff --git a/drivers/spi/spi-s3c24xx.c b/drivers/spi/spi-s3c24xx.c index 68910b310152..5d43a2881f5a 100644 --- a/drivers/spi/spi-s3c24xx.c +++ b/drivers/spi/spi-s3c24xx.c | |||
@@ -525,7 +525,7 @@ static int s3c24xx_spi_probe(struct platform_device *pdev) | |||
525 | memset(hw, 0, sizeof(struct s3c24xx_spi)); | 525 | memset(hw, 0, sizeof(struct s3c24xx_spi)); |
526 | 526 | ||
527 | hw->master = spi_master_get(master); | 527 | hw->master = spi_master_get(master); |
528 | hw->pdata = pdata = pdev->dev.platform_data; | 528 | hw->pdata = pdata = dev_get_platdata(&pdev->dev); |
529 | hw->dev = &pdev->dev; | 529 | hw->dev = &pdev->dev; |
530 | 530 | ||
531 | if (pdata == NULL) { | 531 | if (pdata == NULL) { |
diff --git a/drivers/spi/spi-s3c64xx.c b/drivers/spi/spi-s3c64xx.c index eb53df27e7ea..25cf6716c8ed 100644 --- a/drivers/spi/spi-s3c64xx.c +++ b/drivers/spi/spi-s3c64xx.c | |||
@@ -1272,7 +1272,7 @@ static struct s3c64xx_spi_info *s3c64xx_spi_parse_dt(struct device *dev) | |||
1272 | #else | 1272 | #else |
1273 | static struct s3c64xx_spi_info *s3c64xx_spi_parse_dt(struct device *dev) | 1273 | static struct s3c64xx_spi_info *s3c64xx_spi_parse_dt(struct device *dev) |
1274 | { | 1274 | { |
1275 | return dev->platform_data; | 1275 | return dev_get_platdata(dev); |
1276 | } | 1276 | } |
1277 | #endif | 1277 | #endif |
1278 | 1278 | ||
@@ -1297,7 +1297,7 @@ static int s3c64xx_spi_probe(struct platform_device *pdev) | |||
1297 | struct resource *mem_res; | 1297 | struct resource *mem_res; |
1298 | struct resource *res; | 1298 | struct resource *res; |
1299 | struct s3c64xx_spi_driver_data *sdd; | 1299 | struct s3c64xx_spi_driver_data *sdd; |
1300 | struct s3c64xx_spi_info *sci = pdev->dev.platform_data; | 1300 | struct s3c64xx_spi_info *sci = dev_get_platdata(&pdev->dev); |
1301 | struct spi_master *master; | 1301 | struct spi_master *master; |
1302 | int ret, irq; | 1302 | int ret, irq; |
1303 | char clk_name[16]; | 1303 | char clk_name[16]; |
diff --git a/drivers/spi/spi-sh-msiof.c b/drivers/spi/spi-sh-msiof.c index 2bc5a6b86300..cbc7f2216c16 100644 --- a/drivers/spi/spi-sh-msiof.c +++ b/drivers/spi/spi-sh-msiof.c | |||
@@ -645,7 +645,7 @@ static int sh_msiof_spi_probe(struct platform_device *pdev) | |||
645 | if (pdev->dev.of_node) | 645 | if (pdev->dev.of_node) |
646 | p->info = sh_msiof_spi_parse_dt(&pdev->dev); | 646 | p->info = sh_msiof_spi_parse_dt(&pdev->dev); |
647 | else | 647 | else |
648 | p->info = pdev->dev.platform_data; | 648 | p->info = dev_get_platdata(&pdev->dev); |
649 | 649 | ||
650 | if (!p->info) { | 650 | if (!p->info) { |
651 | dev_err(&pdev->dev, "failed to obtain device info\n"); | 651 | dev_err(&pdev->dev, "failed to obtain device info\n"); |
diff --git a/drivers/spi/spi-sh-sci.c b/drivers/spi/spi-sh-sci.c index 097e506042be..8eefeb6007df 100644 --- a/drivers/spi/spi-sh-sci.c +++ b/drivers/spi/spi-sh-sci.c | |||
@@ -130,7 +130,7 @@ static int sh_sci_spi_probe(struct platform_device *dev) | |||
130 | sp = spi_master_get_devdata(master); | 130 | sp = spi_master_get_devdata(master); |
131 | 131 | ||
132 | platform_set_drvdata(dev, sp); | 132 | platform_set_drvdata(dev, sp); |
133 | sp->info = dev->dev.platform_data; | 133 | sp->info = dev_get_platdata(&dev->dev); |
134 | 134 | ||
135 | /* setup spi bitbang adaptor */ | 135 | /* setup spi bitbang adaptor */ |
136 | sp->bitbang.master = spi_master_get(master); | 136 | sp->bitbang.master = spi_master_get(master); |
diff --git a/drivers/spi/spi-ti-ssp.c b/drivers/spi/spi-ti-ssp.c index 10606fcc6efc..7d20e121e4c1 100644 --- a/drivers/spi/spi-ti-ssp.c +++ b/drivers/spi/spi-ti-ssp.c | |||
@@ -283,7 +283,7 @@ static int ti_ssp_spi_probe(struct platform_device *pdev) | |||
283 | struct device *dev = &pdev->dev; | 283 | struct device *dev = &pdev->dev; |
284 | int error = 0; | 284 | int error = 0; |
285 | 285 | ||
286 | pdata = dev->platform_data; | 286 | pdata = dev_get_platdata(dev); |
287 | if (!pdata) { | 287 | if (!pdata) { |
288 | dev_err(dev, "platform data not found\n"); | 288 | dev_err(dev, "platform data not found\n"); |
289 | return -EINVAL; | 289 | return -EINVAL; |
diff --git a/drivers/spi/spi-tle62x0.c b/drivers/spi/spi-tle62x0.c index 6b0874d782ed..b5a70e3fecb7 100644 --- a/drivers/spi/spi-tle62x0.c +++ b/drivers/spi/spi-tle62x0.c | |||
@@ -247,7 +247,7 @@ static int tle62x0_probe(struct spi_device *spi) | |||
247 | int ptr; | 247 | int ptr; |
248 | int ret; | 248 | int ret; |
249 | 249 | ||
250 | pdata = spi->dev.platform_data; | 250 | pdata = dev_get_platdata(&spi->dev); |
251 | if (pdata == NULL) { | 251 | if (pdata == NULL) { |
252 | dev_err(&spi->dev, "no device data specified\n"); | 252 | dev_err(&spi->dev, "no device data specified\n"); |
253 | return -EINVAL; | 253 | return -EINVAL; |
diff --git a/drivers/spi/spi-xilinx.c b/drivers/spi/spi-xilinx.c index dec7e71a833c..0bf1b2c457a1 100644 --- a/drivers/spi/spi-xilinx.c +++ b/drivers/spi/spi-xilinx.c | |||
@@ -349,7 +349,7 @@ static int xilinx_spi_probe(struct platform_device *pdev) | |||
349 | u32 tmp; | 349 | u32 tmp; |
350 | u8 i; | 350 | u8 i; |
351 | 351 | ||
352 | pdata = pdev->dev.platform_data; | 352 | pdata = dev_get_platdata(&pdev->dev); |
353 | if (pdata) { | 353 | if (pdata) { |
354 | num_cs = pdata->num_chipselect; | 354 | num_cs = pdata->num_chipselect; |
355 | bits_per_word = pdata->bits_per_word; | 355 | bits_per_word = pdata->bits_per_word; |