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>
This commit is contained in:

committed by
Brian Norris

parent
fda5b0e24d
commit
818b973929
@@ -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;
|
||||
}
|
||||
|
Reference in New Issue
Block a user