mtd: nand: use NAND_BBT_SCAN_MAXBLOCKS

Linux-MTD Mailing List linux-mtd at lists.infradead.org
Sat Sep 29 10:59:50 EDT 2012


Gitweb:     http://git.infradead.org/?p=mtd-2.6.git;a=commit;h=61de9da657e8c52606d45ae67dfa187111bf9b55
Commit:     61de9da657e8c52606d45ae67dfa187111bf9b55
Parent:     b2bc415b6b7bb240b967f6dd95007a2cf7b4c424
Author:     Richard Genoud <richard.genoud at gmail.com>
AuthorDate: Tue Sep 11 15:50:54 2012 +0200
Committer:  David Woodhouse <David.Woodhouse at intel.com>
CommitDate: Sat Sep 29 15:54:10 2012 +0100

    mtd: nand: use NAND_BBT_SCAN_MAXBLOCKS
    
    In nand_bbt.c, a hardcoded value was used instead of the define meant
    for that, so we use the define.
    
    There's no functional change.
    
    Signed-off-by: Richard Genoud <richard.genoud at gmail.com>
    Acked-by: Brian Norris <computersforpeace at gmail.com>
    Signed-off-by: Artem Bityutskiy <artem.bityutskiy at linux.intel.com>
    Signed-off-by: David Woodhouse <David.Woodhouse at intel.com>
---
 drivers/mtd/nand/nand_bbt.c |    9 +++++----
 1 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/drivers/mtd/nand/nand_bbt.c b/drivers/mtd/nand/nand_bbt.c
index 2f744dd..916d6e9 100644
--- a/drivers/mtd/nand/nand_bbt.c
+++ b/drivers/mtd/nand/nand_bbt.c
@@ -62,6 +62,7 @@
 #include <linux/slab.h>
 #include <linux/types.h>
 #include <linux/mtd/mtd.h>
+#include <linux/mtd/bbm.h>
 #include <linux/mtd/nand.h>
 #include <linux/mtd/nand_ecc.h>
 #include <linux/bitops.h>
@@ -1258,7 +1259,7 @@ static struct nand_bbt_descr bbt_main_descr = {
 	.offs =	8,
 	.len = 4,
 	.veroffs = 12,
-	.maxblocks = 4,
+	.maxblocks = NAND_BBT_SCAN_MAXBLOCKS,
 	.pattern = bbt_pattern
 };
 
@@ -1268,7 +1269,7 @@ static struct nand_bbt_descr bbt_mirror_descr = {
 	.offs =	8,
 	.len = 4,
 	.veroffs = 12,
-	.maxblocks = 4,
+	.maxblocks = NAND_BBT_SCAN_MAXBLOCKS,
 	.pattern = mirror_pattern
 };
 
@@ -1278,7 +1279,7 @@ static struct nand_bbt_descr bbt_main_no_oob_descr = {
 		| NAND_BBT_NO_OOB,
 	.len = 4,
 	.veroffs = 4,
-	.maxblocks = 4,
+	.maxblocks = NAND_BBT_SCAN_MAXBLOCKS,
 	.pattern = bbt_pattern
 };
 
@@ -1288,7 +1289,7 @@ static struct nand_bbt_descr bbt_mirror_no_oob_descr = {
 		| NAND_BBT_NO_OOB,
 	.len = 4,
 	.veroffs = 4,
-	.maxblocks = 4,
+	.maxblocks = NAND_BBT_SCAN_MAXBLOCKS,
 	.pattern = mirror_pattern
 };
 



More information about the linux-mtd-cvs mailing list