2
0
mirror of https://github.com/edk2-porting/linux-next.git synced 2024-12-23 12:43:55 +08:00

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@gmail.com>
Reviewed-by: Marek Vasut <marex@denx.de>
Reviewed-by: Boris Brezillon <boris.brezillon@free-electrons.com>
This commit is contained in:
Brian Norris 2015-10-30 20:33:23 -07:00
parent 3e63b26bdd
commit 6375219951
4 changed files with 4 additions and 4 deletions

View File

@ -1925,7 +1925,7 @@ static int brcmnand_init_cs(struct brcmnand_host *host)
mtd = &host->mtd; mtd = &host->mtd;
chip = &host->chip; chip = &host->chip;
chip->flash_node = dn; nand_set_flash_node(chip, dn);
chip->priv = host; chip->priv = host;
mtd->priv = chip; mtd->priv = chip;
mtd->name = devm_kasprintf(&pdev->dev, GFP_KERNEL, "brcmnand.%d", mtd->name = devm_kasprintf(&pdev->dev, GFP_KERNEL, "brcmnand.%d",

View File

@ -1033,7 +1033,7 @@ static int __init fsmc_nand_probe(struct platform_device *pdev)
nand->options = pdata->options; nand->options = pdata->options;
nand->select_chip = fsmc_select_chip; nand->select_chip = fsmc_select_chip;
nand->badblockbits = 7; nand->badblockbits = 7;
nand->flash_node = np; nand_set_flash_node(nand, np);
if (pdata->width == FSMC_NAND_BW16) if (pdata->width == FSMC_NAND_BW16)
nand->options |= NAND_BUSWIDTH_16; nand->options |= NAND_BUSWIDTH_16;

View File

@ -1330,7 +1330,7 @@ static int sunxi_nand_chip_init(struct device *dev, struct sunxi_nfc *nfc,
* in the DT. * in the DT.
*/ */
nand->ecc.mode = NAND_ECC_HW; nand->ecc.mode = NAND_ECC_HW;
nand->flash_node = np; nand_set_flash_node(nand, np);
nand->select_chip = sunxi_nfc_select_chip; nand->select_chip = sunxi_nfc_select_chip;
nand->cmd_ctrl = sunxi_nfc_cmd_ctrl; nand->cmd_ctrl = sunxi_nfc_cmd_ctrl;
nand->read_buf = sunxi_nfc_read_buf; nand->read_buf = sunxi_nfc_read_buf;

View File

@ -714,7 +714,7 @@ static int vf610_nfc_probe(struct platform_device *pdev)
goto error; goto error;
} }
chip->flash_node = child; nand_set_flash_node(chip, child);
} }
} }