mtd: maps: 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@samsung.com> Signed-off-by: Brian Norris <computersforpeace@gmail.com> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
This commit is contained in:

committed by
David Woodhouse

parent
0278fd3fa3
commit
d20d5a5780
@@ -248,7 +248,7 @@ static const char * const part_probes[] = { "cmdlinepart", "RedBoot", NULL };
|
||||
|
||||
static int sa1100_mtd_probe(struct platform_device *pdev)
|
||||
{
|
||||
struct flash_platform_data *plat = pdev->dev.platform_data;
|
||||
struct flash_platform_data *plat = dev_get_platdata(&pdev->dev);
|
||||
struct sa_info *info;
|
||||
int err;
|
||||
|
||||
@@ -277,7 +277,7 @@ static int sa1100_mtd_probe(struct platform_device *pdev)
|
||||
static int __exit sa1100_mtd_remove(struct platform_device *pdev)
|
||||
{
|
||||
struct sa_info *info = platform_get_drvdata(pdev);
|
||||
struct flash_platform_data *plat = pdev->dev.platform_data;
|
||||
struct flash_platform_data *plat = dev_get_platdata(&pdev->dev);
|
||||
|
||||
sa1100_destroy(info, plat);
|
||||
|
||||
|
Reference in New Issue
Block a user