summaryrefslogtreecommitdiffstats
path: root/drivers/mtd/tests/oobtest.c
diff options
context:
space:
mode:
authorHuang Shijie <b32955@freescale.com>2013-09-25 08:58:17 +0200
committerBrian Norris <computersforpeace@gmail.com>2013-10-28 00:27:06 +0100
commit818b97392932ac4cecc36ab839957258367004a9 (patch)
tree9d3d864da226e7068ece1b88ccf8b51b9fb25e4d /drivers/mtd/tests/oobtest.c
parentmtd: nand: add more comment for MTD_NANDFLASH/MTD_MLCNANDFLASH (diff)
downloadlinux-818b97392932ac4cecc36ab839957258367004a9.tar.xz
linux-818b97392932ac4cecc36ab839957258367004a9.zip
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/tests/oobtest.c')
-rw-r--r--drivers/mtd/tests/oobtest.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/mtd/tests/oobtest.c b/drivers/mtd/tests/oobtest.c
index ff35c465bfee..2e9e2d11f204 100644
--- a/drivers/mtd/tests/oobtest.c
+++ b/drivers/mtd/tests/oobtest.c
@@ -289,7 +289,7 @@ static int __init mtd_oobtest_init(void)
return err;
}
- if (mtd->type != MTD_NANDFLASH) {
+ if (!mtd_type_is_nand(mtd)) {
pr_info("this test requires NAND flash\n");
goto out;
}