Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1259917 > unrolled thread

[PATCH v2 04/11] mtd: nand: convert to nand_set_flash_node()

Started byBrian Norris <computersforpeace@gmail.com>
First post2015-10-31 04:40 +0100
Last post2015-10-31 16:30 +0100
Articles 2 — 2 participants

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  [PATCH v2 04/11] mtd: nand: convert to nand_set_flash_node() Brian Norris <computersforpeace@gmail.com> - 2015-10-31 04:40 +0100
    Re: [PATCH v2 04/11] mtd: nand: convert to nand_set_flash_node() Marek Vasut <marex@denx.de> - 2015-10-31 16:30 +0100

#1259917 — [PATCH v2 04/11] mtd: nand: convert to nand_set_flash_node()

FromBrian Norris <computersforpeace@gmail.com>
Date2015-10-31 04:40 +0100
Subject[PATCH v2 04/11] mtd: nand: convert to nand_set_flash_node()
Message-ID<qpvbj-69C-3@gated-at.bofh.it>
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>
---
v2: new

 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 12c6190c6e33..7bd4102fde42 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 07af3dc7a4d2..6f9e422e947e 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 ef46ac66248b..df62c637c25e 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 8805d6325579..7b952abf4722 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);
 		}
 	}
 
-- 
2.6.0.rc2.230.g3dd15c0

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [next] | [standalone]


#1260007

FromMarek Vasut <marex@denx.de>
Date2015-10-31 16:30 +0100
Message-ID<qpGgp-4vl-5@gated-at.bofh.it>
In reply to#1259917
On Saturday, October 31, 2015 at 04:33:23 AM, Brian Norris wrote:
> 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>

Thanks for the educational commit message!

Patch is
Reviewed-by: Marek Vasut <marex@denx.de>

Best regards,
Marek Vasut
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web