summaryrefslogtreecommitdiff
path: root/drivers/mtd/nand/denali.c
diff options
context:
space:
mode:
authorHuang Shijie <b32955@freescale.com>2013-09-25 14:58:10 +0800
committerBrian Norris <computersforpeace@gmail.com>2013-10-27 16:27:04 -0700
commit1d0ed69ddd714b6e2a974f42896463366923ded6 (patch)
tree958946ae1a2823cea55b6a1a4d4e4417faa6896b /drivers/mtd/nand/denali.c
parent4ae7d228d6048d25a16bee209ebea24c5ecde825 (diff)
mtd: nand: add a helper to check the SLC/MLC nand chip
Add a helper to check if a nand chip is SLC or MLC. This helper makes the code more readable. Signed-off-by: Huang Shijie <b32955@freescale.com> Signed-off-by: Brian Norris <computersforpeace@gmail.com>
Diffstat (limited to 'drivers/mtd/nand/denali.c')
-rw-r--r--drivers/mtd/nand/denali.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/mtd/nand/denali.c b/drivers/mtd/nand/denali.c
index 154b033b4e8e..370b9dd7a278 100644
--- a/drivers/mtd/nand/denali.c
+++ b/drivers/mtd/nand/denali.c
@@ -1520,7 +1520,7 @@ int denali_init(struct denali_nand_info *denali)
* so just let controller do 15bit ECC for MLC and 8bit ECC for
* SLC if possible.
* */
- if (denali->nand.cellinfo & NAND_CI_CELLTYPE_MSK &&
+ if (!nand_is_slc(&denali->nand) &&
(denali->mtd.oobsize > (denali->bbtskipbytes +
ECC_15BITS * (denali->mtd.writesize /
ECC_SECTOR_SIZE)))) {