mtd: onenand: use dev_get_platdata()
authorJingoo Han <jg1.han@samsung.com>
Tue, 30 Jul 2013 08:18:53 +0000 (17:18 +0900)
committerDavid Woodhouse <David.Woodhouse@intel.com>
Fri, 30 Aug 2013 20:34:34 +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/onenand/generic.c
drivers/mtd/onenand/omap2.c
drivers/mtd/onenand/samsung.c

index 42520a39e7de0f295618c95fa87cbb41192f1f31..63699fffc96de24b3098f629ea495184103386c8 100644 (file)
@@ -38,7 +38,7 @@ struct onenand_info {
 static int generic_onenand_probe(struct platform_device *pdev)
 {
        struct onenand_info *info;
-       struct onenand_platform_data *pdata = pdev->dev.platform_data;
+       struct onenand_platform_data *pdata = dev_get_platdata(&pdev->dev);
        struct resource *res = pdev->resource;
        unsigned long size = resource_size(res);
        int err;
index cd43ceae6f5a12f45fc9fbebab4a6a472a8b8610..558071bf92de0ed607355067b08ebea7fe3833b4 100644 (file)
@@ -639,7 +639,7 @@ static int omap2_onenand_probe(struct platform_device *pdev)
        struct resource *res;
        struct mtd_part_parser_data ppdata = {};
 
-       pdata = pdev->dev.platform_data;
+       pdata = dev_get_platdata(&pdev->dev);
        if (pdata == NULL) {
                dev_err(&pdev->dev, "platform data missing\n");
                return -ENODEV;
index cebc48decd067a59e17fdac8321f32796995b68d..df7400dd4df847b321bb1fdedbb5ac522e9c5b83 100644 (file)
@@ -867,7 +867,7 @@ static int s3c_onenand_probe(struct platform_device *pdev)
        struct resource *r;
        int size, err;
 
-       pdata = pdev->dev.platform_data;
+       pdata = dev_get_platdata(&pdev->dev);
        /* No need to check pdata. the platform data is optional */
 
        size = sizeof(struct mtd_info) + sizeof(struct onenand_chip);