瀏覽代碼

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>
Huang Shijie 12 年之前
父節點
當前提交
4f8a3ba700
共有 1 個文件被更改,包括 5 次插入0 次删除
  1. 5 0
      include/uapi/mtd/mtd-abi.h

+ 5 - 0
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__ */