mtd: devices: use dev_get_platdata()
authorJingoo Han <jg1.han@samsung.com>
Tue, 30 Jul 2013 08:17:44 +0000 (17:17 +0900)
committerDavid Woodhouse <David.Woodhouse@intel.com>
Fri, 30 Aug 2013 20:34:31 +0000 (21:34 +0100)
Use the wrapper function for retrieving the platform data instead of
accessing dev->platform_data directly.

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: Brian Norris <computersforpeace@gmail.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
drivers/mtd/devices/m25p80.c
drivers/mtd/devices/mtd_dataflash.c
drivers/mtd/devices/sst25l.c

index 57522c810bf1ddda051558fc89e500cfee778264..b5190c4bd305c0292a425522844fed24aad3c150 100644 (file)
@@ -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;
 
index 4a4366437e1750caf8223a7d9641300b68b9157f..0e8cbfeba11e42a85da4a843cd7f212263eb9448 100644 (file)
@@ -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;
 
index 38b59790f4b7925d002df6a435836724ce3b3d3b..a42f1f0e7281417398f4de453845ff8edf79b60c 100644 (file)
@@ -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