summaryrefslogtreecommitdiffstats
path: root/include/uapi/mtd
diff options
context:
space:
mode:
authorHuang Shijie <b32955@freescale.com>2013-09-25 08:58:18 +0200
committerBrian Norris <computersforpeace@gmail.com>2013-10-28 00:27:06 +0100
commit4f8a3ba700b882f61d4cea2d68a8f83fa93c6dfd (patch)
tree0c23853ddfa10de1761aeae939adbd5c8194462e /include/uapi/mtd
parentmtd: nand: add a helper to detect the nand type (diff)
downloadlinux-4f8a3ba700b882f61d4cea2d68a8f83fa93c6dfd.tar.xz
linux-4f8a3ba700b882f61d4cea2d68a8f83fa93c6dfd.zip
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/uapi/mtd')
-rw-r--r--include/uapi/mtd/mtd-abi.h5
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__ */