mtd: denali: use NAND_CI_CELLTYPE_MSK instead of hardcoded constant
Linux-MTD Mailing List
linux-mtd at lists.infradead.org
Fri Aug 30 16:59:02 EDT 2013
Gitweb: http://git.infradead.org/?p=mtd-2.6.git;a=commit;h=07cc0fbadb8bfcbba57c9035beece608ceee0bd3
Commit: 07cc0fbadb8bfcbba57c9035beece608ceee0bd3
Parent: 52a073bd2c2b005250c4254b747d5ad9b2a089a3
Author: Akinobu Mita <akinobu.mita at gmail.com>
AuthorDate: Sat Jul 27 23:09:53 2013 +0900
Committer: David Woodhouse <David.Woodhouse at intel.com>
CommitDate: Fri Aug 30 21:34:29 2013 +0100
mtd: denali: use NAND_CI_CELLTYPE_MSK instead of hardcoded constant
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 at gmail.com>
Cc: Artem Bityutskiy <dedekind1 at gmail.com>
Signed-off-by: Brian Norris <computersforpeace at gmail.com>
Signed-off-by: David Woodhouse <David.Woodhouse at intel.com>
---
drivers/mtd/nand/denali.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/mtd/nand/denali.c b/drivers/mtd/nand/denali.c
index 0c8bb6b..2ed2bb3 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 & 0xc &&
+ if (denali->nand.cellinfo & NAND_CI_CELLTYPE_MSK &&
(denali->mtd.oobsize > (denali->bbtskipbytes +
ECC_15BITS * (denali->mtd.writesize /
ECC_SECTOR_SIZE)))) {
More information about the linux-mtd-cvs
mailing list