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>
This commit is contained in:
Boris BREZILLON
2015-11-02 00:03:38 +01:00
committed by Brian Norris
parent 8361a9b8cb
commit 44ec23c9ec
3 changed files with 7 additions and 7 deletions

View File

@@ -3989,11 +3989,11 @@ int nand_scan_ident(struct mtd_info *mtd, int maxchips,
struct nand_flash_dev *type;
int ret;
if (chip->flash_node) {
if (nand_get_flash_node(chip)) {
/* MTD can automatically handle DT partitions, etc. */
mtd_set_of_node(mtd, chip->flash_node);
mtd_set_of_node(mtd, nand_get_flash_node(chip));
ret = nand_dt_init(mtd, chip, chip->flash_node);
ret = nand_dt_init(mtd, chip, nand_get_flash_node(chip));
if (ret)
return ret;
}