diff options
author | Jingoo Han <jg1.han@samsung.com> | 2013-05-23 06:20:40 -0400 |
---|---|---|
committer | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2013-05-23 10:09:55 -0400 |
commit | 24b5a82cf5709a4bc577f42fdaa61b23a7f58f08 (patch) | |
tree | 39c17c904a2ac67c8b76b9edccf1da00f3620998 | |
parent | c7788792a5e7b0d5d7f96d0766b4cb6112d47d75 (diff) |
spi: use platform_{get,set}_drvdata()
Use the wrapper functions for getting and setting the driver data using
platform_device instead of using dev_{get,set}_drvdata() with &pdev->dev,
so we can directly pass a struct platform_device.
Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
-rw-r--r-- | drivers/spi/spi-davinci.c | 4 | ||||
-rw-r--r-- | drivers/spi/spi-fsl-spi.c | 2 | ||||
-rw-r--r-- | drivers/spi/spi-mpc52xx-psc.c | 2 | ||||
-rw-r--r-- | drivers/spi/spi-mpc52xx.c | 4 | ||||
-rw-r--r-- | drivers/spi/spi-omap-100k.c | 4 | ||||
-rw-r--r-- | drivers/spi/spi-omap-uwire.c | 4 | ||||
-rw-r--r-- | drivers/spi/spi-omap2-mcspi.c | 4 | ||||
-rw-r--r-- | drivers/spi/spi-orion.c | 4 | ||||
-rw-r--r-- | drivers/spi/spi-ppc4xx.c | 6 | ||||
-rw-r--r-- | drivers/spi/spi-rspi.c | 4 | ||||
-rw-r--r-- | drivers/spi/spi-sh-hspi.c | 4 | ||||
-rw-r--r-- | drivers/spi/spi-sh.c | 4 | ||||
-rw-r--r-- | drivers/spi/spi-tegra114.c | 4 | ||||
-rw-r--r-- | drivers/spi/spi-tegra20-sflash.c | 4 | ||||
-rw-r--r-- | drivers/spi/spi-tegra20-slink.c | 4 |
15 files changed, 28 insertions, 30 deletions
diff --git a/drivers/spi/spi-davinci.c b/drivers/spi/spi-davinci.c index 50b13c9b1ab6..968e36416cfa 100644 --- a/drivers/spi/spi-davinci.c +++ b/drivers/spi/spi-davinci.c | |||
@@ -865,7 +865,7 @@ static int davinci_spi_probe(struct platform_device *pdev) | |||
865 | goto err; | 865 | goto err; |
866 | } | 866 | } |
867 | 867 | ||
868 | dev_set_drvdata(&pdev->dev, master); | 868 | platform_set_drvdata(pdev, master); |
869 | 869 | ||
870 | dspi = spi_master_get_devdata(master); | 870 | dspi = spi_master_get_devdata(master); |
871 | if (dspi == NULL) { | 871 | if (dspi == NULL) { |
@@ -1044,7 +1044,7 @@ static int davinci_spi_remove(struct platform_device *pdev) | |||
1044 | struct spi_master *master; | 1044 | struct spi_master *master; |
1045 | struct resource *r; | 1045 | struct resource *r; |
1046 | 1046 | ||
1047 | master = dev_get_drvdata(&pdev->dev); | 1047 | master = platform_get_drvdata(pdev); |
1048 | dspi = spi_master_get_devdata(master); | 1048 | dspi = spi_master_get_devdata(master); |
1049 | 1049 | ||
1050 | spi_bitbang_stop(&dspi->bitbang); | 1050 | spi_bitbang_stop(&dspi->bitbang); |
diff --git a/drivers/spi/spi-fsl-spi.c b/drivers/spi/spi-fsl-spi.c index 14e202ee7036..41e89c3e3edc 100644 --- a/drivers/spi/spi-fsl-spi.c +++ b/drivers/spi/spi-fsl-spi.c | |||
@@ -853,7 +853,7 @@ err: | |||
853 | 853 | ||
854 | static int of_fsl_spi_remove(struct platform_device *ofdev) | 854 | static int of_fsl_spi_remove(struct platform_device *ofdev) |
855 | { | 855 | { |
856 | struct spi_master *master = dev_get_drvdata(&ofdev->dev); | 856 | struct spi_master *master = platform_get_drvdata(ofdev); |
857 | struct mpc8xxx_spi *mpc8xxx_spi = spi_master_get_devdata(master); | 857 | struct mpc8xxx_spi *mpc8xxx_spi = spi_master_get_devdata(master); |
858 | int ret; | 858 | int ret; |
859 | 859 | ||
diff --git a/drivers/spi/spi-mpc52xx-psc.c b/drivers/spi/spi-mpc52xx-psc.c index 291120b37dbb..fed0571d4dec 100644 --- a/drivers/spi/spi-mpc52xx-psc.c +++ b/drivers/spi/spi-mpc52xx-psc.c | |||
@@ -481,7 +481,7 @@ static int mpc52xx_psc_spi_of_probe(struct platform_device *op) | |||
481 | 481 | ||
482 | static int mpc52xx_psc_spi_of_remove(struct platform_device *op) | 482 | static int mpc52xx_psc_spi_of_remove(struct platform_device *op) |
483 | { | 483 | { |
484 | struct spi_master *master = spi_master_get(dev_get_drvdata(&op->dev)); | 484 | struct spi_master *master = spi_master_get(platform_get_drvdata(op)); |
485 | struct mpc52xx_psc_spi *mps = spi_master_get_devdata(master); | 485 | struct mpc52xx_psc_spi *mps = spi_master_get_devdata(master); |
486 | 486 | ||
487 | flush_workqueue(mps->workqueue); | 487 | flush_workqueue(mps->workqueue); |
diff --git a/drivers/spi/spi-mpc52xx.c b/drivers/spi/spi-mpc52xx.c index 29f77056eedc..7c675fe83101 100644 --- a/drivers/spi/spi-mpc52xx.c +++ b/drivers/spi/spi-mpc52xx.c | |||
@@ -438,7 +438,7 @@ static int mpc52xx_spi_probe(struct platform_device *op) | |||
438 | master->mode_bits = SPI_CPOL | SPI_CPHA | SPI_LSB_FIRST; | 438 | master->mode_bits = SPI_CPOL | SPI_CPHA | SPI_LSB_FIRST; |
439 | master->dev.of_node = op->dev.of_node; | 439 | master->dev.of_node = op->dev.of_node; |
440 | 440 | ||
441 | dev_set_drvdata(&op->dev, master); | 441 | platform_set_drvdata(op, master); |
442 | 442 | ||
443 | ms = spi_master_get_devdata(master); | 443 | ms = spi_master_get_devdata(master); |
444 | ms->master = master; | 444 | ms->master = master; |
@@ -529,7 +529,7 @@ static int mpc52xx_spi_probe(struct platform_device *op) | |||
529 | 529 | ||
530 | static int mpc52xx_spi_remove(struct platform_device *op) | 530 | static int mpc52xx_spi_remove(struct platform_device *op) |
531 | { | 531 | { |
532 | struct spi_master *master = spi_master_get(dev_get_drvdata(&op->dev)); | 532 | struct spi_master *master = spi_master_get(platform_get_drvdata(op)); |
533 | struct mpc52xx_spi *ms = spi_master_get_devdata(master); | 533 | struct mpc52xx_spi *ms = spi_master_get_devdata(master); |
534 | int i; | 534 | int i; |
535 | 535 | ||
diff --git a/drivers/spi/spi-omap-100k.c b/drivers/spi/spi-omap-100k.c index 78d29a18dcc4..9236764861a9 100644 --- a/drivers/spi/spi-omap-100k.c +++ b/drivers/spi/spi-omap-100k.c | |||
@@ -510,7 +510,7 @@ static int omap1_spi100k_probe(struct platform_device *pdev) | |||
510 | master->num_chipselect = 2; | 510 | master->num_chipselect = 2; |
511 | master->mode_bits = MODEBITS; | 511 | master->mode_bits = MODEBITS; |
512 | 512 | ||
513 | dev_set_drvdata(&pdev->dev, master); | 513 | platform_set_drvdata(pdev, master); |
514 | 514 | ||
515 | spi100k = spi_master_get_devdata(master); | 515 | spi100k = spi_master_get_devdata(master); |
516 | spi100k->master = master; | 516 | spi100k->master = master; |
@@ -569,7 +569,7 @@ static int omap1_spi100k_remove(struct platform_device *pdev) | |||
569 | unsigned long flags; | 569 | unsigned long flags; |
570 | int status = 0; | 570 | int status = 0; |
571 | 571 | ||
572 | master = dev_get_drvdata(&pdev->dev); | 572 | master = platform_get_drvdata(pdev); |
573 | spi100k = spi_master_get_devdata(master); | 573 | spi100k = spi_master_get_devdata(master); |
574 | 574 | ||
575 | spin_lock_irqsave(&spi100k->lock, flags); | 575 | spin_lock_irqsave(&spi100k->lock, flags); |
diff --git a/drivers/spi/spi-omap-uwire.c b/drivers/spi/spi-omap-uwire.c index 102b233b50c4..a6a8f0961750 100644 --- a/drivers/spi/spi-omap-uwire.c +++ b/drivers/spi/spi-omap-uwire.c | |||
@@ -495,7 +495,7 @@ static int uwire_probe(struct platform_device *pdev) | |||
495 | return -ENOMEM; | 495 | return -ENOMEM; |
496 | } | 496 | } |
497 | 497 | ||
498 | dev_set_drvdata(&pdev->dev, uwire); | 498 | platform_set_drvdata(pdev, uwire); |
499 | 499 | ||
500 | uwire->ck = clk_get(&pdev->dev, "fck"); | 500 | uwire->ck = clk_get(&pdev->dev, "fck"); |
501 | if (IS_ERR(uwire->ck)) { | 501 | if (IS_ERR(uwire->ck)) { |
@@ -538,7 +538,7 @@ static int uwire_probe(struct platform_device *pdev) | |||
538 | 538 | ||
539 | static int uwire_remove(struct platform_device *pdev) | 539 | static int uwire_remove(struct platform_device *pdev) |
540 | { | 540 | { |
541 | struct uwire_spi *uwire = dev_get_drvdata(&pdev->dev); | 541 | struct uwire_spi *uwire = platform_get_drvdata(pdev); |
542 | int status; | 542 | int status; |
543 | 543 | ||
544 | // FIXME remove all child devices, somewhere ... | 544 | // FIXME remove all child devices, somewhere ... |
diff --git a/drivers/spi/spi-omap2-mcspi.c b/drivers/spi/spi-omap2-mcspi.c index 86d2158946bb..1a75aefd1504 100644 --- a/drivers/spi/spi-omap2-mcspi.c +++ b/drivers/spi/spi-omap2-mcspi.c | |||
@@ -1204,7 +1204,7 @@ static int omap2_mcspi_probe(struct platform_device *pdev) | |||
1204 | master->cleanup = omap2_mcspi_cleanup; | 1204 | master->cleanup = omap2_mcspi_cleanup; |
1205 | master->dev.of_node = node; | 1205 | master->dev.of_node = node; |
1206 | 1206 | ||
1207 | dev_set_drvdata(&pdev->dev, master); | 1207 | platform_set_drvdata(pdev, master); |
1208 | 1208 | ||
1209 | mcspi = spi_master_get_devdata(master); | 1209 | mcspi = spi_master_get_devdata(master); |
1210 | mcspi->master = master; | 1210 | mcspi->master = master; |
@@ -1318,7 +1318,7 @@ static int omap2_mcspi_remove(struct platform_device *pdev) | |||
1318 | struct omap2_mcspi *mcspi; | 1318 | struct omap2_mcspi *mcspi; |
1319 | struct omap2_mcspi_dma *dma_channels; | 1319 | struct omap2_mcspi_dma *dma_channels; |
1320 | 1320 | ||
1321 | master = dev_get_drvdata(&pdev->dev); | 1321 | master = platform_get_drvdata(pdev); |
1322 | mcspi = spi_master_get_devdata(master); | 1322 | mcspi = spi_master_get_devdata(master); |
1323 | dma_channels = mcspi->dma_channels; | 1323 | dma_channels = mcspi->dma_channels; |
1324 | 1324 | ||
diff --git a/drivers/spi/spi-orion.c b/drivers/spi/spi-orion.c index 66a5f82cf138..5d90bebaa0fa 100644 --- a/drivers/spi/spi-orion.c +++ b/drivers/spi/spi-orion.c | |||
@@ -428,7 +428,7 @@ static int orion_spi_probe(struct platform_device *pdev) | |||
428 | master->transfer_one_message = orion_spi_transfer_one_message; | 428 | master->transfer_one_message = orion_spi_transfer_one_message; |
429 | master->num_chipselect = ORION_NUM_CHIPSELECTS; | 429 | master->num_chipselect = ORION_NUM_CHIPSELECTS; |
430 | 430 | ||
431 | dev_set_drvdata(&pdev->dev, master); | 431 | platform_set_drvdata(pdev, master); |
432 | 432 | ||
433 | spi = spi_master_get_devdata(master); | 433 | spi = spi_master_get_devdata(master); |
434 | spi->master = master; | 434 | spi->master = master; |
@@ -485,7 +485,7 @@ static int orion_spi_remove(struct platform_device *pdev) | |||
485 | struct resource *r; | 485 | struct resource *r; |
486 | struct orion_spi *spi; | 486 | struct orion_spi *spi; |
487 | 487 | ||
488 | master = dev_get_drvdata(&pdev->dev); | 488 | master = platform_get_drvdata(pdev); |
489 | spi = spi_master_get_devdata(master); | 489 | spi = spi_master_get_devdata(master); |
490 | 490 | ||
491 | clk_disable_unprepare(spi->clk); | 491 | clk_disable_unprepare(spi->clk); |
diff --git a/drivers/spi/spi-ppc4xx.c b/drivers/spi/spi-ppc4xx.c index 357f183a4fb7..8548e574749d 100644 --- a/drivers/spi/spi-ppc4xx.c +++ b/drivers/spi/spi-ppc4xx.c | |||
@@ -406,7 +406,7 @@ static int spi_ppc4xx_of_probe(struct platform_device *op) | |||
406 | if (master == NULL) | 406 | if (master == NULL) |
407 | return -ENOMEM; | 407 | return -ENOMEM; |
408 | master->dev.of_node = np; | 408 | master->dev.of_node = np; |
409 | dev_set_drvdata(dev, master); | 409 | platform_set_drvdata(op, master); |
410 | hw = spi_master_get_devdata(master); | 410 | hw = spi_master_get_devdata(master); |
411 | hw->master = spi_master_get(master); | 411 | hw->master = spi_master_get(master); |
412 | hw->dev = dev; | 412 | hw->dev = dev; |
@@ -553,7 +553,6 @@ request_mem_error: | |||
553 | free_gpios: | 553 | free_gpios: |
554 | free_gpios(hw); | 554 | free_gpios(hw); |
555 | free_master: | 555 | free_master: |
556 | dev_set_drvdata(dev, NULL); | ||
557 | spi_master_put(master); | 556 | spi_master_put(master); |
558 | 557 | ||
559 | dev_err(dev, "initialization failed\n"); | 558 | dev_err(dev, "initialization failed\n"); |
@@ -562,11 +561,10 @@ free_master: | |||
562 | 561 | ||
563 | static int spi_ppc4xx_of_remove(struct platform_device *op) | 562 | static int spi_ppc4xx_of_remove(struct platform_device *op) |
564 | { | 563 | { |
565 | struct spi_master *master = dev_get_drvdata(&op->dev); | 564 | struct spi_master *master = platform_get_drvdata(op); |
566 | struct ppc4xx_spi *hw = spi_master_get_devdata(master); | 565 | struct ppc4xx_spi *hw = spi_master_get_devdata(master); |
567 | 566 | ||
568 | spi_bitbang_stop(&hw->bitbang); | 567 | spi_bitbang_stop(&hw->bitbang); |
569 | dev_set_drvdata(&op->dev, NULL); | ||
570 | release_mem_region(hw->mapbase, hw->mapsize); | 568 | release_mem_region(hw->mapbase, hw->mapsize); |
571 | free_irq(hw->irqnum, hw); | 569 | free_irq(hw->irqnum, hw); |
572 | iounmap(hw->regs); | 570 | iounmap(hw->regs); |
diff --git a/drivers/spi/spi-rspi.c b/drivers/spi/spi-rspi.c index 902f2fb902db..b44a6ac3cec9 100644 --- a/drivers/spi/spi-rspi.c +++ b/drivers/spi/spi-rspi.c | |||
@@ -719,7 +719,7 @@ static void rspi_release_dma(struct rspi_data *rspi) | |||
719 | 719 | ||
720 | static int rspi_remove(struct platform_device *pdev) | 720 | static int rspi_remove(struct platform_device *pdev) |
721 | { | 721 | { |
722 | struct rspi_data *rspi = dev_get_drvdata(&pdev->dev); | 722 | struct rspi_data *rspi = platform_get_drvdata(pdev); |
723 | 723 | ||
724 | spi_unregister_master(rspi->master); | 724 | spi_unregister_master(rspi->master); |
725 | rspi_release_dma(rspi); | 725 | rspi_release_dma(rspi); |
@@ -759,7 +759,7 @@ static int rspi_probe(struct platform_device *pdev) | |||
759 | } | 759 | } |
760 | 760 | ||
761 | rspi = spi_master_get_devdata(master); | 761 | rspi = spi_master_get_devdata(master); |
762 | dev_set_drvdata(&pdev->dev, rspi); | 762 | platform_set_drvdata(pdev, rspi); |
763 | 763 | ||
764 | rspi->master = master; | 764 | rspi->master = master; |
765 | rspi->addr = ioremap(res->start, resource_size(res)); | 765 | rspi->addr = ioremap(res->start, resource_size(res)); |
diff --git a/drivers/spi/spi-sh-hspi.c b/drivers/spi/spi-sh-hspi.c index 60cfae51c713..d3a62b9cfff3 100644 --- a/drivers/spi/spi-sh-hspi.c +++ b/drivers/spi/spi-sh-hspi.c | |||
@@ -297,7 +297,7 @@ static int hspi_probe(struct platform_device *pdev) | |||
297 | } | 297 | } |
298 | 298 | ||
299 | hspi = spi_master_get_devdata(master); | 299 | hspi = spi_master_get_devdata(master); |
300 | dev_set_drvdata(&pdev->dev, hspi); | 300 | platform_set_drvdata(pdev, hspi); |
301 | 301 | ||
302 | /* init hspi */ | 302 | /* init hspi */ |
303 | hspi->master = master; | 303 | hspi->master = master; |
@@ -341,7 +341,7 @@ static int hspi_probe(struct platform_device *pdev) | |||
341 | 341 | ||
342 | static int hspi_remove(struct platform_device *pdev) | 342 | static int hspi_remove(struct platform_device *pdev) |
343 | { | 343 | { |
344 | struct hspi_priv *hspi = dev_get_drvdata(&pdev->dev); | 344 | struct hspi_priv *hspi = platform_get_drvdata(pdev); |
345 | 345 | ||
346 | pm_runtime_disable(&pdev->dev); | 346 | pm_runtime_disable(&pdev->dev); |
347 | 347 | ||
diff --git a/drivers/spi/spi-sh.c b/drivers/spi/spi-sh.c index 3c3600a994bd..c120a70094f2 100644 --- a/drivers/spi/spi-sh.c +++ b/drivers/spi/spi-sh.c | |||
@@ -434,7 +434,7 @@ static irqreturn_t spi_sh_irq(int irq, void *_ss) | |||
434 | 434 | ||
435 | static int spi_sh_remove(struct platform_device *pdev) | 435 | static int spi_sh_remove(struct platform_device *pdev) |
436 | { | 436 | { |
437 | struct spi_sh_data *ss = dev_get_drvdata(&pdev->dev); | 437 | struct spi_sh_data *ss = platform_get_drvdata(pdev); |
438 | 438 | ||
439 | spi_unregister_master(ss->master); | 439 | spi_unregister_master(ss->master); |
440 | destroy_workqueue(ss->workqueue); | 440 | destroy_workqueue(ss->workqueue); |
@@ -471,7 +471,7 @@ static int spi_sh_probe(struct platform_device *pdev) | |||
471 | } | 471 | } |
472 | 472 | ||
473 | ss = spi_master_get_devdata(master); | 473 | ss = spi_master_get_devdata(master); |
474 | dev_set_drvdata(&pdev->dev, ss); | 474 | platform_set_drvdata(pdev, ss); |
475 | 475 | ||
476 | switch (res->flags & IORESOURCE_MEM_TYPE_MASK) { | 476 | switch (res->flags & IORESOURCE_MEM_TYPE_MASK) { |
477 | case IORESOURCE_MEM_8BIT: | 477 | case IORESOURCE_MEM_8BIT: |
diff --git a/drivers/spi/spi-tegra114.c b/drivers/spi/spi-tegra114.c index 598eb45e8008..e8f542ab8935 100644 --- a/drivers/spi/spi-tegra114.c +++ b/drivers/spi/spi-tegra114.c | |||
@@ -1041,7 +1041,7 @@ static int tegra_spi_probe(struct platform_device *pdev) | |||
1041 | dev_err(&pdev->dev, "master allocation failed\n"); | 1041 | dev_err(&pdev->dev, "master allocation failed\n"); |
1042 | return -ENOMEM; | 1042 | return -ENOMEM; |
1043 | } | 1043 | } |
1044 | dev_set_drvdata(&pdev->dev, master); | 1044 | platform_set_drvdata(pdev, master); |
1045 | tspi = spi_master_get_devdata(master); | 1045 | tspi = spi_master_get_devdata(master); |
1046 | 1046 | ||
1047 | /* Parse DT */ | 1047 | /* Parse DT */ |
@@ -1152,7 +1152,7 @@ exit_free_master: | |||
1152 | 1152 | ||
1153 | static int tegra_spi_remove(struct platform_device *pdev) | 1153 | static int tegra_spi_remove(struct platform_device *pdev) |
1154 | { | 1154 | { |
1155 | struct spi_master *master = dev_get_drvdata(&pdev->dev); | 1155 | struct spi_master *master = platform_get_drvdata(pdev); |
1156 | struct tegra_spi_data *tspi = spi_master_get_devdata(master); | 1156 | struct tegra_spi_data *tspi = spi_master_get_devdata(master); |
1157 | 1157 | ||
1158 | free_irq(tspi->irq, tspi); | 1158 | free_irq(tspi->irq, tspi); |
diff --git a/drivers/spi/spi-tegra20-sflash.c b/drivers/spi/spi-tegra20-sflash.c index 09df8e22dba0..c1d5d95e70ea 100644 --- a/drivers/spi/spi-tegra20-sflash.c +++ b/drivers/spi/spi-tegra20-sflash.c | |||
@@ -480,7 +480,7 @@ static int tegra_sflash_probe(struct platform_device *pdev) | |||
480 | master->num_chipselect = MAX_CHIP_SELECT; | 480 | master->num_chipselect = MAX_CHIP_SELECT; |
481 | master->bus_num = -1; | 481 | master->bus_num = -1; |
482 | 482 | ||
483 | dev_set_drvdata(&pdev->dev, master); | 483 | platform_set_drvdata(pdev, master); |
484 | tsd = spi_master_get_devdata(master); | 484 | tsd = spi_master_get_devdata(master); |
485 | tsd->master = master; | 485 | tsd->master = master; |
486 | tsd->dev = &pdev->dev; | 486 | tsd->dev = &pdev->dev; |
@@ -555,7 +555,7 @@ exit_free_master: | |||
555 | 555 | ||
556 | static int tegra_sflash_remove(struct platform_device *pdev) | 556 | static int tegra_sflash_remove(struct platform_device *pdev) |
557 | { | 557 | { |
558 | struct spi_master *master = dev_get_drvdata(&pdev->dev); | 558 | struct spi_master *master = platform_get_drvdata(pdev); |
559 | struct tegra_sflash_data *tsd = spi_master_get_devdata(master); | 559 | struct tegra_sflash_data *tsd = spi_master_get_devdata(master); |
560 | 560 | ||
561 | free_irq(tsd->irq, tsd); | 561 | free_irq(tsd->irq, tsd); |
diff --git a/drivers/spi/spi-tegra20-slink.c b/drivers/spi/spi-tegra20-slink.c index 3faf88d003de..80490cc11ce5 100644 --- a/drivers/spi/spi-tegra20-slink.c +++ b/drivers/spi/spi-tegra20-slink.c | |||
@@ -1089,7 +1089,7 @@ static int tegra_slink_probe(struct platform_device *pdev) | |||
1089 | master->num_chipselect = MAX_CHIP_SELECT; | 1089 | master->num_chipselect = MAX_CHIP_SELECT; |
1090 | master->bus_num = -1; | 1090 | master->bus_num = -1; |
1091 | 1091 | ||
1092 | dev_set_drvdata(&pdev->dev, master); | 1092 | platform_set_drvdata(pdev, master); |
1093 | tspi = spi_master_get_devdata(master); | 1093 | tspi = spi_master_get_devdata(master); |
1094 | tspi->master = master; | 1094 | tspi->master = master; |
1095 | tspi->dev = &pdev->dev; | 1095 | tspi->dev = &pdev->dev; |
@@ -1193,7 +1193,7 @@ exit_free_master: | |||
1193 | 1193 | ||
1194 | static int tegra_slink_remove(struct platform_device *pdev) | 1194 | static int tegra_slink_remove(struct platform_device *pdev) |
1195 | { | 1195 | { |
1196 | struct spi_master *master = dev_get_drvdata(&pdev->dev); | 1196 | struct spi_master *master = platform_get_drvdata(pdev); |
1197 | struct tegra_slink_data *tspi = spi_master_get_devdata(master); | 1197 | struct tegra_slink_data *tspi = spi_master_get_devdata(master); |
1198 | 1198 | ||
1199 | free_irq(tspi->irq, tspi); | 1199 | free_irq(tspi->irq, tspi); |