aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mtd/nand/nand_bbt.c
diff options
context:
space:
mode:
authorBrian Norris <computersforpeace@gmail.com>2011-09-20 21:34:25 -0400
committerArtem Bityutskiy <artem.bityutskiy@intel.com>2011-09-21 02:19:06 -0400
commitd57f40544a41fdfe90fd863b6865138c5a82f1cc (patch)
tree4d5e8f6d0a62e8fa06ccfabd13fe9364b19db1b5 /drivers/mtd/nand/nand_bbt.c
parent7387ce773256f446bdd0280b2449b635441f906e (diff)
mtd: utilize `mtd_is_*()' functions
Signed-off-by: Brian Norris <computersforpeace@gmail.com> Signed-off-by: Artem Bityutskiy <artem.bityutskiy@intel.com>
Diffstat (limited to 'drivers/mtd/nand/nand_bbt.c')
-rw-r--r--drivers/mtd/nand/nand_bbt.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/mtd/nand/nand_bbt.c b/drivers/mtd/nand/nand_bbt.c
index 7dbfce4a1a5b..584bdcb3c61a 100644
--- a/drivers/mtd/nand/nand_bbt.c
+++ b/drivers/mtd/nand/nand_bbt.c
@@ -400,7 +400,7 @@ static int scan_block_full(struct mtd_info *mtd, struct nand_bbt_descr *bd,
400 400
401 ret = scan_read_raw_oob(mtd, buf, offs, readlen); 401 ret = scan_read_raw_oob(mtd, buf, offs, readlen);
402 /* Ignore ECC errors when checking for BBM */ 402 /* Ignore ECC errors when checking for BBM */
403 if (ret && ret != -EUCLEAN && ret != -EBADMSG) 403 if (ret && !mtd_is_bitflip_or_eccerr(ret))
404 return ret; 404 return ret;
405 405
406 for (j = 0; j < len; j++, buf += scanlen) { 406 for (j = 0; j < len; j++, buf += scanlen) {
@@ -430,7 +430,7 @@ static int scan_block_fast(struct mtd_info *mtd, struct nand_bbt_descr *bd,
430 */ 430 */
431 ret = mtd->read_oob(mtd, offs, &ops); 431 ret = mtd->read_oob(mtd, offs, &ops);
432 /* Ignore ECC errors when checking for BBM */ 432 /* Ignore ECC errors when checking for BBM */
433 if (ret && ret != -EUCLEAN && ret != -EBADMSG) 433 if (ret && !mtd_is_bitflip_or_eccerr(ret))
434 return ret; 434 return ret;
435 435
436 if (check_short_pattern(buf, bd)) 436 if (check_short_pattern(buf, bd))