Commit e09f7f99 authored by Jingoo Han's avatar Jingoo Han Committed by David Woodhouse

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: 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 453810b7
...@@ -38,7 +38,7 @@ struct onenand_info { ...@@ -38,7 +38,7 @@ struct onenand_info {
static int generic_onenand_probe(struct platform_device *pdev) static int generic_onenand_probe(struct platform_device *pdev)
{ {
struct onenand_info *info; 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; struct resource *res = pdev->resource;
unsigned long size = resource_size(res); unsigned long size = resource_size(res);
int err; int err;
......
...@@ -639,7 +639,7 @@ static int omap2_onenand_probe(struct platform_device *pdev) ...@@ -639,7 +639,7 @@ static int omap2_onenand_probe(struct platform_device *pdev)
struct resource *res; struct resource *res;
struct mtd_part_parser_data ppdata = {}; struct mtd_part_parser_data ppdata = {};
pdata = pdev->dev.platform_data; pdata = dev_get_platdata(&pdev->dev);
if (pdata == NULL) { if (pdata == NULL) {
dev_err(&pdev->dev, "platform data missing\n"); dev_err(&pdev->dev, "platform data missing\n");
return -ENODEV; return -ENODEV;
......
...@@ -867,7 +867,7 @@ static int s3c_onenand_probe(struct platform_device *pdev) ...@@ -867,7 +867,7 @@ static int s3c_onenand_probe(struct platform_device *pdev)
struct resource *r; struct resource *r;
int size, err; int size, err;
pdata = pdev->dev.platform_data; pdata = dev_get_platdata(&pdev->dev);
/* No need to check pdata. the platform data is optional */ /* No need to check pdata. the platform data is optional */
size = sizeof(struct mtd_info) + sizeof(struct onenand_chip); size = sizeof(struct mtd_info) + sizeof(struct onenand_chip);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment