mtd: devices: use dev_get_platdata()
Linux-MTD Mailing List
linux-mtd at lists.infradead.org
Fri Aug 30 16:59:02 EDT 2013
Gitweb: http://git.infradead.org/?p=mtd-2.6.git;a=commit;h=0278fd3fa34fb029e40224dd83d2628254f45481
Commit: 0278fd3fa34fb029e40224dd83d2628254f45481
Parent: 07cc0fbadb8bfcbba57c9035beece608ceee0bd3
Author: Jingoo Han <jg1.han at samsung.com>
AuthorDate: Tue Jul 30 17:17:44 2013 +0900
Committer: David Woodhouse <David.Woodhouse at intel.com>
CommitDate: Fri Aug 30 21:34:31 2013 +0100
mtd: devices: 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 at samsung.com>
Signed-off-by: Brian Norris <computersforpeace at gmail.com>
Signed-off-by: David Woodhouse <David.Woodhouse at intel.com>
---
drivers/mtd/devices/m25p80.c | 2 +-
drivers/mtd/devices/mtd_dataflash.c | 2 +-
drivers/mtd/devices/sst25l.c | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/mtd/devices/m25p80.c b/drivers/mtd/devices/m25p80.c
index 57522c8..b5190c4 100644
--- a/drivers/mtd/devices/m25p80.c
+++ b/drivers/mtd/devices/m25p80.c
@@ -929,7 +929,7 @@ static int m25p_probe(struct spi_device *spi)
* a chip ID, try the JEDEC id commands; they'll work for most
* newer chips, even if we don't recognize the particular chip.
*/
- data = spi->dev.platform_data;
+ data = dev_get_platdata(&spi->dev);
if (data && data->type) {
const struct spi_device_id *plat_id;
diff --git a/drivers/mtd/devices/mtd_dataflash.c b/drivers/mtd/devices/mtd_dataflash.c
index 4a43664..0e8cbfe 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,
struct dataflash *priv;
struct mtd_info *device;
struct mtd_part_parser_data ppdata;
- struct flash_platform_data *pdata = spi->dev.platform_data;
+ struct flash_platform_data *pdata = dev_get_platdata(&spi->dev);
char *otp_tag = "";
int err = 0;
diff --git a/drivers/mtd/devices/sst25l.c b/drivers/mtd/devices/sst25l.c
index 38b5979..a42f1f0 100644
--- a/drivers/mtd/devices/sst25l.c
+++ b/drivers/mtd/devices/sst25l.c
@@ -372,7 +372,7 @@ static int sst25l_probe(struct spi_device *spi)
mutex_init(&flash->lock);
spi_set_drvdata(spi, flash);
- data = spi->dev.platform_data;
+ data = dev_get_platdata(&spi->dev);
if (data && data->name)
flash->mtd.name = data->name;
else
More information about the linux-mtd-cvs
mailing list