mtd: denali: use NAND_CI_CELLTYPE_MSK instead of hardcoded constant
authorAkinobu Mita <akinobu.mita@gmail.com>
Sat, 27 Jul 2013 14:09:53 +0000 (23:09 +0900)
committerDavid Woodhouse <David.Woodhouse@intel.com>
Fri, 30 Aug 2013 20:34:29 +0000 (21:34 +0100)
Use NAND_CI_CELLTYPE_MSK to extract the cell type from nand_chip.cellinfo
instead of hardcoded constant.

Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com>
Cc: Artem Bityutskiy <dedekind1@gmail.com>
Signed-off-by: Brian Norris <computersforpeace@gmail.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
drivers/mtd/nand/denali.c

index 0c8bb6b..2ed2bb3 100644 (file)
@@ -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 & 0xc &&
+       if (denali->nand.cellinfo & NAND_CI_CELLTYPE_MSK &&
                        (denali->mtd.oobsize > (denali->bbtskipbytes +
                        ECC_15BITS * (denali->mtd.writesize /
                        ECC_SECTOR_SIZE)))) {