mtd: nand: use NAND_BBT_SCAN_MAXBLOCKS
[firefly-linux-kernel-4.4.55.git] / drivers / mtd / nand / nand_bbt.c
index 2f744dd907409fdf4d9182e415cc5bd7709052f9..916d6e9c0ab1d9c5872c0ed66b26832ff4bf9062 100644 (file)
@@ -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
 };