aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHuang Shijie <b32955@freescale.com>2013-08-20 13:58:35 +0800
committerBrian Norris <computersforpeace@gmail.com>2013-10-22 16:18:19 -0700
commit9561080de23f6e254b7eb9b7556adf960dad58a3 (patch)
treeee626f0ff392932283fc1ad2b00c60625dcb39d7
parent2e4fe96b2bc5ad33793d0d5cbeb23c9f76155211 (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>
-rw-r--r--include/mtd/mtd-abi.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/include/mtd/mtd-abi.h b/include/mtd/mtd-abi.h
index 4de167b..bcd7496 100644
--- a/include/mtd/mtd-abi.h
+++ b/include/mtd/mtd-abi.h
@@ -274,4 +274,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__ */