mtd: nand: convert to nand_set_flash_node()
Linux-MTD Mailing List
linux-mtd at lists.infradead.org
Tue Jan 12 15:59:03 PST 2016
Gitweb: http://git.infradead.org/?p=mtd-2.6.git;a=commit;h=6375219951a66047805ed977b674615d152001ee
Commit: 6375219951a66047805ed977b674615d152001ee
Parent: 3e63b26bdd4069c3df2cd7ce7217a21d06801b41
Author: Brian Norris <computersforpeace at gmail.com>
AuthorDate: Fri Oct 30 20:33:23 2015 -0700
Committer: Brian Norris <computersforpeace at gmail.com>
CommitDate: Wed Nov 11 13:45:17 2015 -0800
mtd: nand: convert to nand_set_flash_node()
Used semantic patch with 'make coccicheck MODE=patch COCCI=script.cocci':
---8<----
virtual patch
@@
struct nand_chip *c;
struct device_node *d;
@@
-(c)->flash_node = (d)
+nand_set_flash_node(c, d)
---8<----
Signed-off-by: Brian Norris <computersforpeace at gmail.com>
Reviewed-by: Marek Vasut <marex at denx.de>
Reviewed-by: Boris Brezillon <boris.brezillon at free-electrons.com>
---
drivers/mtd/nand/brcmnand/brcmnand.c | 2 +-
drivers/mtd/nand/fsmc_nand.c | 2 +-
drivers/mtd/nand/sunxi_nand.c | 2 +-
drivers/mtd/nand/vf610_nfc.c | 2 +-
4 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/mtd/nand/brcmnand/brcmnand.c b/drivers/mtd/nand/brcmnand/brcmnand.c
index 12c6190..7bd4102 100644
--- a/drivers/mtd/nand/brcmnand/brcmnand.c
+++ b/drivers/mtd/nand/brcmnand/brcmnand.c
@@ -1925,7 +1925,7 @@ static int brcmnand_init_cs(struct brcmnand_host *host)
mtd = &host->mtd;
chip = &host->chip;
- chip->flash_node = dn;
+ nand_set_flash_node(chip, dn);
chip->priv = host;
mtd->priv = chip;
mtd->name = devm_kasprintf(&pdev->dev, GFP_KERNEL, "brcmnand.%d",
diff --git a/drivers/mtd/nand/fsmc_nand.c b/drivers/mtd/nand/fsmc_nand.c
index 07af3dc..6f9e422 100644
--- a/drivers/mtd/nand/fsmc_nand.c
+++ b/drivers/mtd/nand/fsmc_nand.c
@@ -1033,7 +1033,7 @@ static int __init fsmc_nand_probe(struct platform_device *pdev)
nand->options = pdata->options;
nand->select_chip = fsmc_select_chip;
nand->badblockbits = 7;
- nand->flash_node = np;
+ nand_set_flash_node(nand, np);
if (pdata->width == FSMC_NAND_BW16)
nand->options |= NAND_BUSWIDTH_16;
diff --git a/drivers/mtd/nand/sunxi_nand.c b/drivers/mtd/nand/sunxi_nand.c
index 8247118..0775ae4 100644
--- a/drivers/mtd/nand/sunxi_nand.c
+++ b/drivers/mtd/nand/sunxi_nand.c
@@ -1330,7 +1330,7 @@ static int sunxi_nand_chip_init(struct device *dev, struct sunxi_nfc *nfc,
* in the DT.
*/
nand->ecc.mode = NAND_ECC_HW;
- nand->flash_node = np;
+ nand_set_flash_node(nand, np);
nand->select_chip = sunxi_nfc_select_chip;
nand->cmd_ctrl = sunxi_nfc_cmd_ctrl;
nand->read_buf = sunxi_nfc_read_buf;
diff --git a/drivers/mtd/nand/vf610_nfc.c b/drivers/mtd/nand/vf610_nfc.c
index 8805d63..7b952ab 100644
--- a/drivers/mtd/nand/vf610_nfc.c
+++ b/drivers/mtd/nand/vf610_nfc.c
@@ -714,7 +714,7 @@ static int vf610_nfc_probe(struct platform_device *pdev)
goto error;
}
- chip->flash_node = child;
+ nand_set_flash_node(chip, child);
}
}
More information about the linux-mtd-cvs
mailing list