diff options
author | Brian Norris <computersforpeace@gmail.com> | 2011-09-20 18:34:25 -0700 |
---|---|---|
committer | Artem Bityutskiy <artem.bityutskiy@intel.com> | 2011-09-21 09:19:06 +0300 |
commit | d57f40544a41fdfe90fd863b6865138c5a82f1cc (patch) | |
tree | 4d5e8f6d0a62e8fa06ccfabd13fe9364b19db1b5 /drivers/mtd/mtdconcat.c | |
parent | 7387ce773256f446bdd0280b2449b635441f906e (diff) | |
download | blackbird-op-linux-d57f40544a41fdfe90fd863b6865138c5a82f1cc.tar.gz blackbird-op-linux-d57f40544a41fdfe90fd863b6865138c5a82f1cc.zip |
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/mtdconcat.c')
-rw-r--r-- | drivers/mtd/mtdconcat.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/mtd/mtdconcat.c b/drivers/mtd/mtdconcat.c index d3fabd144d6c..6df4d4d4eb92 100644 --- a/drivers/mtd/mtdconcat.c +++ b/drivers/mtd/mtdconcat.c @@ -95,10 +95,10 @@ concat_read(struct mtd_info *mtd, loff_t from, size_t len, /* Save information about bitflips! */ if (unlikely(err)) { - if (err == -EBADMSG) { + if (mtd_is_eccerr(err)) { mtd->ecc_stats.failed++; ret = err; - } else if (err == -EUCLEAN) { + } else if (mtd_is_bitflip(err)) { mtd->ecc_stats.corrected++; /* Do not overwrite -EBADMSG !! */ if (!ret) @@ -279,10 +279,10 @@ concat_read_oob(struct mtd_info *mtd, loff_t from, struct mtd_oob_ops *ops) /* Save information about bitflips! */ if (unlikely(err)) { - if (err == -EBADMSG) { + if (mtd_is_eccerr(err)) { mtd->ecc_stats.failed++; ret = err; - } else if (err == -EUCLEAN) { + } else if (mtd_is_bitflip(err)) { mtd->ecc_stats.corrected++; /* Do not overwrite -EBADMSG !! */ if (!ret) |