summaryrefslogtreecommitdiff
path: root/drivers/mtd/ssfdc.c
diff options
context:
space:
mode:
authorHuang Shijie <b32955@freescale.com>2013-09-25 14:58:17 +0800
committerNitin Garg <nitin.garg@freescale.com>2014-04-16 08:06:07 -0500
commit8cfe6114defcc81c4cf3ca664ab23169d9338f14 (patch)
tree64cf11b24d561bc2e17634a3f0df16e1c825d3d2 /drivers/mtd/ssfdc.c
parentcfa0895aa35f7be36cc4cf4e1951bb8bb4b69fb6 (diff)
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/ssfdc.c')
-rw-r--r--drivers/mtd/ssfdc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/mtd/ssfdc.c b/drivers/mtd/ssfdc.c
index ab2a52a039c3..daf82ba7aba0 100644
--- a/drivers/mtd/ssfdc.c
+++ b/drivers/mtd/ssfdc.c
@@ -290,7 +290,7 @@ static void ssfdcr_add_mtd(struct mtd_blktrans_ops *tr, struct mtd_info *mtd)
int cis_sector;
/* Check for small page NAND flash */
- if (mtd->type != MTD_NANDFLASH || mtd->oobsize != OOB_SIZE ||
+ if (!mtd_type_is_nand(mtd) || mtd->oobsize != OOB_SIZE ||
mtd->size > UINT_MAX)
return;