diff options
author | Jingoo Han <jg1.han@samsung.com> | 2013-07-30 08:18:33 (GMT) |
---|---|---|
committer | David Woodhouse <David.Woodhouse@intel.com> | 2013-08-30 20:34:33 (GMT) |
commit | 453810b79571ff6622a481f0556fc4972f87a24f (patch) | |
tree | dd85005761927d3aa209c9fc642e945ec60ecdd2 /drivers/mtd/nand/gpio.c | |
parent | d20d5a5780a014bc4d24dbcb6daf7673a9dddf98 (diff) | |
download | linux-453810b79571ff6622a481f0556fc4972f87a24f.tar.xz |
mtd: nand: 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>
Diffstat (limited to 'drivers/mtd/nand/gpio.c')
-rw-r--r-- | drivers/mtd/nand/gpio.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/mtd/nand/gpio.c b/drivers/mtd/nand/gpio.c index 800a1cc..e826f89 100644 --- a/drivers/mtd/nand/gpio.c +++ b/drivers/mtd/nand/gpio.c @@ -167,8 +167,8 @@ static inline int gpio_nand_get_config(const struct device *dev, if (!ret) return ret; - if (dev->platform_data) { - memcpy(plat, dev->platform_data, sizeof(*plat)); + if (dev_get_platdata(dev)) { + memcpy(plat, dev_get_platdata(dev), sizeof(*plat)); return 0; } @@ -207,7 +207,7 @@ static int gpio_nand_probe(struct platform_device *pdev) struct mtd_part_parser_data ppdata = {}; int ret = 0; - if (!pdev->dev.of_node && !pdev->dev.platform_data) + if (!pdev->dev.of_node && !dev_get_platdata(&pdev->dev)) return -EINVAL; gpiomtd = devm_kzalloc(&pdev->dev, sizeof(*gpiomtd), GFP_KERNEL); |