From 263e138719f6358c3cf2ce47d6254cebef31dd4b Mon Sep 17 00:00:00 2001 From: Huang Shijie Date: Tue, 20 Aug 2013 13:58:37 +0800 Subject: check the MLC nand type In the current code, the MTD_NANDFLASH stands for both the SLC and MLC. In the kernel, the MTD_NANDFLASH only stands for the SLC now, so in order to keep the logic unchanged, we should also check the MLC NAND by MTD_MLCNANDFLASH. Signed-off-by: Huang Shijie Signed-off-by: Brian Norris --- lib/libmtd.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'lib') diff --git a/lib/libmtd.c b/lib/libmtd.c index 3e8109a..2089373 100644 --- a/lib/libmtd.c +++ b/lib/libmtd.c @@ -776,7 +776,8 @@ int mtd_get_dev_info1(libmtd_t desc, int mtd_num, struct mtd_dev_info *mtd) mtd->eb_cnt = mtd->size / mtd->eb_size; mtd->type = type_str2int(mtd->type_str); - mtd->bb_allowed = !!(mtd->type == MTD_NANDFLASH); + mtd->bb_allowed = !!(mtd->type == MTD_NANDFLASH || + mtd->type == MTD_MLCNANDFLASH); return 0; } -- cgit v1.2.3