diff options
Diffstat (limited to 'drivers/mtd/devices/mtd_dataflash.c')
-rw-r--r-- | drivers/mtd/devices/mtd_dataflash.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/mtd/devices/mtd_dataflash.c b/drivers/mtd/devices/mtd_dataflash.c index 28779b6dfcd9..0e8cbfeba11e 100644 --- a/drivers/mtd/devices/mtd_dataflash.c +++ b/drivers/mtd/devices/mtd_dataflash.c | |||
@@ -622,7 +622,7 @@ static int add_dataflash_otp(struct spi_device *spi, char *name, int nr_pages, | |||
622 | struct dataflash *priv; | 622 | struct dataflash *priv; |
623 | struct mtd_info *device; | 623 | struct mtd_info *device; |
624 | struct mtd_part_parser_data ppdata; | 624 | struct mtd_part_parser_data ppdata; |
625 | struct flash_platform_data *pdata = spi->dev.platform_data; | 625 | struct flash_platform_data *pdata = dev_get_platdata(&spi->dev); |
626 | char *otp_tag = ""; | 626 | char *otp_tag = ""; |
627 | int err = 0; | 627 | int err = 0; |
628 | 628 | ||
@@ -661,7 +661,7 @@ static int add_dataflash_otp(struct spi_device *spi, char *name, int nr_pages, | |||
661 | dev_info(&spi->dev, "%s (%lld KBytes) pagesize %d bytes%s\n", | 661 | dev_info(&spi->dev, "%s (%lld KBytes) pagesize %d bytes%s\n", |
662 | name, (long long)((device->size + 1023) >> 10), | 662 | name, (long long)((device->size + 1023) >> 10), |
663 | pagesize, otp_tag); | 663 | pagesize, otp_tag); |
664 | dev_set_drvdata(&spi->dev, priv); | 664 | spi_set_drvdata(spi, priv); |
665 | 665 | ||
666 | ppdata.of_node = spi->dev.of_node; | 666 | ppdata.of_node = spi->dev.of_node; |
667 | err = mtd_device_parse_register(device, NULL, &ppdata, | 667 | err = mtd_device_parse_register(device, NULL, &ppdata, |
@@ -671,7 +671,7 @@ static int add_dataflash_otp(struct spi_device *spi, char *name, int nr_pages, | |||
671 | if (!err) | 671 | if (!err) |
672 | return 0; | 672 | return 0; |
673 | 673 | ||
674 | dev_set_drvdata(&spi->dev, NULL); | 674 | spi_set_drvdata(spi, NULL); |
675 | kfree(priv); | 675 | kfree(priv); |
676 | return err; | 676 | return err; |
677 | } | 677 | } |
@@ -895,14 +895,14 @@ static int dataflash_probe(struct spi_device *spi) | |||
895 | 895 | ||
896 | static int dataflash_remove(struct spi_device *spi) | 896 | static int dataflash_remove(struct spi_device *spi) |
897 | { | 897 | { |
898 | struct dataflash *flash = dev_get_drvdata(&spi->dev); | 898 | struct dataflash *flash = spi_get_drvdata(spi); |
899 | int status; | 899 | int status; |
900 | 900 | ||
901 | pr_debug("%s: remove\n", dev_name(&spi->dev)); | 901 | pr_debug("%s: remove\n", dev_name(&spi->dev)); |
902 | 902 | ||
903 | status = mtd_device_unregister(&flash->mtd); | 903 | status = mtd_device_unregister(&flash->mtd); |
904 | if (status == 0) { | 904 | if (status == 0) { |
905 | dev_set_drvdata(&spi->dev, NULL); | 905 | spi_set_drvdata(spi, NULL); |
906 | kfree(flash); | 906 | kfree(flash); |
907 | } | 907 | } |
908 | return status; | 908 | return status; |