mtd: mtd-abi: add a helper to detect the nand type

The helper is for user applications, and it is just a copy of
the kernel helper: mtd_type_is_nand();

Signed-off-by: Huang Shijie <b32955@freescale.com>
Signed-off-by: Brian Norris <computersforpeace@gmail.com>
This commit is contained in:
Huang Shijie 2013-09-25 14:58:18 +08:00 committed by Brian Norris
parent 818b973929
commit 4f8a3ba700
1 changed files with 5 additions and 0 deletions

View File

@ -275,4 +275,9 @@ enum mtd_file_modes {
MTD_FILE_MODE_RAW,
};
static inline int mtd_type_is_nand_user(const struct mtd_info_user *mtd)
{
return mtd->type == MTD_NANDFLASH || mtd->type == MTD_MLCNANDFLASH;
}
#endif /* __MTD_ABI_H__ */