summaryrefslogtreecommitdiff
path: root/drivers/mtd/nand/vf610_nfc.c
diff options
context:
space:
mode:
authorBoris BREZILLON <boris.brezillon@free-electrons.com>2015-11-02 02:03:38 +0300
committerBrian Norris <computersforpeace@gmail.com>2015-11-12 02:54:15 +0300
commit44ec23c9ecd95d13ec9dd8d0b0dc9e82bd3258ff (patch)
treebd3d665187d4f9ca5838d4d67fe1ec2ac2d01b75 /drivers/mtd/nand/vf610_nfc.c
parent8361a9b8cb6a9c71b7cf884a87b2532d8367c185 (diff)
downloadlinux-44ec23c9ecd95d13ec9dd8d0b0dc9e82bd3258ff.tar.xz
mtd: nand: convert to nand_get_flash_node()
Used semantic patch with 'make coccicheck MODE=patch COCCI=script.cocci': ---8<---- virtual patch @@ struct nand_chip c; struct nand_chip *cp; @@ ( -(cp)->flash_node +nand_get_flash_node(cp) | -(c).flash_node +nand_get_flash_node(&c) ) ---8<---- Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com> Signed-off-by: Brian Norris <computersforpeace@gmail.com>
Diffstat (limited to 'drivers/mtd/nand/vf610_nfc.c')
-rw-r--r--drivers/mtd/nand/vf610_nfc.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/mtd/nand/vf610_nfc.c b/drivers/mtd/nand/vf610_nfc.c
index b6df4c6d60ca..1c86c6b42515 100644
--- a/drivers/mtd/nand/vf610_nfc.c
+++ b/drivers/mtd/nand/vf610_nfc.c
@@ -707,7 +707,7 @@ static int vf610_nfc_probe(struct platform_device *pdev)
for_each_available_child_of_node(nfc->dev->of_node, child) {
if (of_device_is_compatible(child, "fsl,vf610-nfc-nandcs")) {
- if (chip->flash_node) {
+ if (nand_get_flash_node(chip)) {
dev_err(nfc->dev,
"Only one NAND chip supported!\n");
err = -EINVAL;
@@ -718,7 +718,7 @@ static int vf610_nfc_probe(struct platform_device *pdev)
}
}
- if (!chip->flash_node) {
+ if (!nand_get_flash_node(chip)) {
dev_err(nfc->dev, "NAND chip sub-node missing!\n");
err = -ENODEV;
goto err_clk;
@@ -814,7 +814,7 @@ static int vf610_nfc_probe(struct platform_device *pdev)
return mtd_device_register(mtd, NULL, 0);
error:
- of_node_put(chip->flash_node);
+ of_node_put(nand_get_flash_node(chip));
err_clk:
clk_disable_unprepare(nfc->clk);
return err;