diff options
author | Huang Shijie <b32955@freescale.com> | 2013-09-25 14:58:18 +0800 |
---|---|---|
committer | Huang Shijie <b32955@freescale.com> | 2013-11-05 09:45:59 +0800 |
commit | a68a6812bcbad7196f8fbb76050dba27dc4e91c9 (patch) | |
tree | e662b1af43016a2fd51765ce613d1f6fec09f8e7 /include | |
parent | 70ce61a1333fc2ebcf0b7430f17ff3dd32aadf66 (diff) |
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>
Diffstat (limited to 'include')
-rw-r--r-- | include/uapi/mtd/mtd-abi.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/include/uapi/mtd/mtd-abi.h b/include/uapi/mtd/mtd-abi.h index e89b096856f8..e272ea060e38 100644 --- a/include/uapi/mtd/mtd-abi.h +++ b/include/uapi/mtd/mtd-abi.h @@ -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__ */ |