summaryrefslogtreecommitdiff
path: root/drivers/mtd/inftlcore.c
diff options
context:
space:
mode:
authorHuang Shijie <b32955@freescale.com>2013-09-25 10:58:17 +0400
committerBrian Norris <computersforpeace@gmail.com>2013-10-28 03:27:06 +0400
commit818b97392932ac4cecc36ab839957258367004a9 (patch)
tree9d3d864da226e7068ece1b88ccf8b51b9fb25e4d /drivers/mtd/inftlcore.c
parentfda5b0e24dca3d52671e5a6543a285d4e86c55e1 (diff)
downloadlinux-818b97392932ac4cecc36ab839957258367004a9.tar.xz
mtd: nand: add a helper to detect the nand type
This helper detects that whether the mtd's type is nand type. Now, it's clear that the MTD_NANDFLASH stands for SLC nand only. So use the mtd_type_is_nand() to replace the old check method to do the nand type (include the SLC and MLC) check. Signed-off-by: Huang Shijie <b32955@freescale.com> Signed-off-by: Brian Norris <computersforpeace@gmail.com>
Diffstat (limited to 'drivers/mtd/inftlcore.c')
-rw-r--r--drivers/mtd/inftlcore.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/mtd/inftlcore.c b/drivers/mtd/inftlcore.c
index 3af351484098..b66b541877f0 100644
--- a/drivers/mtd/inftlcore.c
+++ b/drivers/mtd/inftlcore.c
@@ -50,7 +50,7 @@ static void inftl_add_mtd(struct mtd_blktrans_ops *tr, struct mtd_info *mtd)
struct INFTLrecord *inftl;
unsigned long temp;
- if (mtd->type != MTD_NANDFLASH || mtd->size > UINT_MAX)
+ if (!mtd_type_is_nand(mtd) || mtd->size > UINT_MAX)
return;
/* OK, this is moderately ugly. But probably safe. Alternatives? */
if (memcmp(mtd->name, "DiskOnChip", 10))