diff options
author | Boris BREZILLON <boris.brezillon@free-electrons.com> | 2015-11-02 00:03:38 +0100 |
---|---|---|
committer | Brian Norris <computersforpeace@gmail.com> | 2015-11-11 15:54:15 -0800 |
commit | 44ec23c9ecd95d13ec9dd8d0b0dc9e82bd3258ff (patch) | |
tree | bd3d665187d4f9ca5838d4d67fe1ec2ac2d01b75 /drivers/mtd/nand/nand_base.c | |
parent | 8361a9b8cb6a9c71b7cf884a87b2532d8367c185 (diff) | |
download | lwn-44ec23c9ecd95d13ec9dd8d0b0dc9e82bd3258ff.tar.gz lwn-44ec23c9ecd95d13ec9dd8d0b0dc9e82bd3258ff.zip |
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/nand_base.c')
-rw-r--r-- | drivers/mtd/nand/nand_base.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/mtd/nand/nand_base.c b/drivers/mtd/nand/nand_base.c index 939ab3d5acc2..4ac4efe65c62 100644 --- a/drivers/mtd/nand/nand_base.c +++ b/drivers/mtd/nand/nand_base.c @@ -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; } |