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/mtdchar.c | |
parent | 7387ce773256f446bdd0280b2449b635441f906e (diff) | |
download | op-kernel-dev-d57f40544a41fdfe90fd863b6865138c5a82f1cc.zip op-kernel-dev-d57f40544a41fdfe90fd863b6865138c5a82f1cc.tar.gz |
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/mtdchar.c')
-rw-r--r-- | drivers/mtd/mtdchar.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/mtd/mtdchar.c b/drivers/mtd/mtdchar.c index 8feb5fd..47be6e5 100644 --- a/drivers/mtd/mtdchar.c +++ b/drivers/mtd/mtdchar.c @@ -242,7 +242,7 @@ static ssize_t mtd_read(struct file *file, char __user *buf, size_t count,loff_t * Userspace software which accesses NAND this way * must be aware of the fact that it deals with NAND */ - if (!ret || (ret == -EUCLEAN) || (ret == -EBADMSG)) { + if (!ret || mtd_is_bitflip_or_eccerr(ret)) { *ppos += retlen; if (copy_to_user(buf, kbuf, retlen)) { kfree(kbuf); @@ -491,7 +491,7 @@ static int mtd_do_readoob(struct file *file, struct mtd_info *mtd, * does not calculate ECC for the OOB area, so do not rely on * this behavior unless you have replaced it with your own. */ - if (ret == -EUCLEAN || ret == -EBADMSG) + if (mtd_is_bitflip_or_eccerr(ret)) return 0; return ret; |