aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJingoo Han <jg1.han@samsung.com>2013-07-30 04:18:53 -0400
committerDavid Woodhouse <David.Woodhouse@intel.com>2013-08-30 16:34:34 -0400
commite09f7f992833ed73f1afc5eaa7cc4d5b10b04b7c (patch)
tree9c748313a954d77789024388c4b539734577669b
parent453810b79571ff6622a481f0556fc4972f87a24f (diff)
mtd: onenand: 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>
-rw-r--r--drivers/mtd/onenand/generic.c2
-rw-r--r--drivers/mtd/onenand/omap2.c2
-rw-r--r--drivers/mtd/onenand/samsung.c2
3 files changed, 3 insertions, 3 deletions
diff --git a/drivers/mtd/onenand/generic.c b/drivers/mtd/onenand/generic.c
index 42520a39e7de..63699fffc96d 100644
--- a/drivers/mtd/onenand/generic.c
+++ b/drivers/mtd/onenand/generic.c
@@ -38,7 +38,7 @@ struct onenand_info {
38static int generic_onenand_probe(struct platform_device *pdev) 38static int generic_onenand_probe(struct platform_device *pdev)
39{ 39{
40 struct onenand_info *info; 40 struct onenand_info *info;
41 struct onenand_platform_data *pdata = pdev->dev.platform_data; 41 struct onenand_platform_data *pdata = dev_get_platdata(&pdev->dev);
42 struct resource *res = pdev->resource; 42 struct resource *res = pdev->resource;
43 unsigned long size = resource_size(res); 43 unsigned long size = resource_size(res);
44 int err; 44 int err;
diff --git a/drivers/mtd/onenand/omap2.c b/drivers/mtd/onenand/omap2.c
index cd43ceae6f5a..558071bf92de 100644
--- a/drivers/mtd/onenand/omap2.c
+++ b/drivers/mtd/onenand/omap2.c
@@ -639,7 +639,7 @@ static int omap2_onenand_probe(struct platform_device *pdev)
639 struct resource *res; 639 struct resource *res;
640 struct mtd_part_parser_data ppdata = {}; 640 struct mtd_part_parser_data ppdata = {};
641 641
642 pdata = pdev->dev.platform_data; 642 pdata = dev_get_platdata(&pdev->dev);
643 if (pdata == NULL) { 643 if (pdata == NULL) {
644 dev_err(&pdev->dev, "platform data missing\n"); 644 dev_err(&pdev->dev, "platform data missing\n");
645 return -ENODEV; 645 return -ENODEV;
diff --git a/drivers/mtd/onenand/samsung.c b/drivers/mtd/onenand/samsung.c
index cebc48decd06..df7400dd4df8 100644
--- a/drivers/mtd/onenand/samsung.c
+++ b/drivers/mtd/onenand/samsung.c
@@ -867,7 +867,7 @@ static int s3c_onenand_probe(struct platform_device *pdev)
867 struct resource *r; 867 struct resource *r;
868 int size, err; 868 int size, err;
869 869
870 pdata = pdev->dev.platform_data; 870 pdata = dev_get_platdata(&pdev->dev);
871 /* No need to check pdata. the platform data is optional */ 871 /* No need to check pdata. the platform data is optional */
872 872
873 size = sizeof(struct mtd_info) + sizeof(struct onenand_chip); 873 size = sizeof(struct mtd_info) + sizeof(struct onenand_chip);