From: Jingoo Han Date: Tue, 30 Jul 2013 08:18:53 +0000 (+0900) Subject: mtd: onenand: use dev_get_platdata() X-Git-Tag: MMI-PSA29.97-13-9~13677^2~61 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=e09f7f992833ed73f1afc5eaa7cc4d5b10b04b7c;p=GitHub%2FMotorolaMobilityLLC%2Fkernel-slsi.git 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 Signed-off-by: Brian Norris Signed-off-by: David Woodhouse --- 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 { 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; 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) 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; 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) 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);