Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 0278fd3f authored by Jingoo Han's avatar Jingoo Han Committed by David Woodhouse
Browse files

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: default avatarJingoo Han <jg1.han@samsung.com>
Signed-off-by: default avatarBrian Norris <computersforpeace@gmail.com>
Signed-off-by: default avatarDavid Woodhouse <David.Woodhouse@intel.com>
parent 07cc0fba
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -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
	 * a chip ID, try the JEDEC id commands; they'll work for most
	 * newer chips, even if we don't recognize the particular chip.
	 * 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) {
	if (data && data->type) {
		const struct spi_device_id *plat_id;
		const struct spi_device_id *plat_id;


+1 −1
Original line number Original line Diff line number Diff line
@@ -622,7 +622,7 @@ static int add_dataflash_otp(struct spi_device *spi, char *name, int nr_pages,
	struct dataflash		*priv;
	struct dataflash		*priv;
	struct mtd_info			*device;
	struct mtd_info			*device;
	struct mtd_part_parser_data	ppdata;
	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 = "";
	char				*otp_tag = "";
	int				err = 0;
	int				err = 0;


+1 −1
Original line number Original line Diff line number Diff line
@@ -372,7 +372,7 @@ static int sst25l_probe(struct spi_device *spi)
	mutex_init(&flash->lock);
	mutex_init(&flash->lock);
	spi_set_drvdata(spi, flash);
	spi_set_drvdata(spi, flash);


	data = spi->dev.platform_data;
	data = dev_get_platdata(&spi->dev);
	if (data && data->name)
	if (data && data->name)
		flash->mtd.name = data->name;
		flash->mtd.name = data->name;
	else
	else