mtd: nand: brcm: rely on generic DT parsing done in nand_scan_ident()

Linux-MTD Mailing List linux-mtd at lists.infradead.org
Mon May 23 21:59:06 PDT 2016


Gitweb:     http://git.infradead.org/?p=mtd-2.6.git;a=commit;h=541e3c8912fe4257ba0b71908ea8fbf79143f510
Commit:     541e3c8912fe4257ba0b71908ea8fbf79143f510
Parent:     f679888f29fe5c4a4c44459f2c1fc62b72188773
Author:     Boris Brezillon <boris.brezillon at free-electrons.com>
AuthorDate: Fri Apr 1 14:54:24 2016 +0200
Committer:  Boris Brezillon <boris.brezillon at free-electrons.com>
CommitDate: Tue Apr 19 22:05:30 2016 +0200

    mtd: nand: brcm: rely on generic DT parsing done in nand_scan_ident()
    
    The core now takes care of parsing generic DT properties in
    nand_scan_ident() when nand_set_flash_node() has been called.
    Rely on this initialization instead of calling of_get_nand_xxx()
    manually.
    
    Signed-off-by: Boris Brezillon <boris.brezillon at free-electrons.com>
    Acked-by: Brian Norris <computersforpeace at gmail.com>
---
 drivers/mtd/nand/brcmnand/brcmnand.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/mtd/nand/brcmnand/brcmnand.c b/drivers/mtd/nand/brcmnand/brcmnand.c
index 0b7a698..e5f281f 100644
--- a/drivers/mtd/nand/brcmnand/brcmnand.c
+++ b/drivers/mtd/nand/brcmnand/brcmnand.c
@@ -32,7 +32,6 @@
 #include <linux/mtd/nand.h>
 #include <linux/mtd/partitions.h>
 #include <linux/of.h>
-#include <linux/of_mtd.h>
 #include <linux/of_platform.h>
 #include <linux/slab.h>
 #include <linux/list.h>
@@ -2001,8 +2000,8 @@ static int brcmnand_init_cs(struct brcmnand_host *host, struct device_node *dn)
 	 */
 	chip->options |= NAND_USE_BOUNCE_BUFFER;
 
-	if (of_get_nand_on_flash_bbt(dn))
-		chip->bbt_options |= NAND_BBT_USE_FLASH | NAND_BBT_NO_OOB;
+	if (chip->bbt_options & NAND_BBT_USE_FLASH)
+		chip->bbt_options |= NAND_BBT_NO_OOB;
 
 	if (brcmnand_setup_dev(host))
 		return -ENXIO;



More information about the linux-mtd-cvs mailing list