[PATCH v2 append] mtd: mtd-abi: add a helper to detect the nand type
Huang Shijie
b32955 at freescale.com
Mon Aug 19 04:59:37 EDT 2013
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 at freescale.com>
---
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 16a9406..ad8e867 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 bool mtd_type_is_nand_user(const struct mtd_info_user *mtd)
+{
+ return mtd->type == MTD_NANDFLASH || mtd->type == MTD_MLCNANDFLASH;
+}
+
#endif /* __MTD_ABI_H__ */
--
1.7.1
More information about the linux-mtd
mailing list