aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHuang Shijie <b32955@freescale.com>2013-09-25 02:58:18 -0400
committerNitin Garg <nitin.garg@freescale.com>2014-04-16 09:06:07 -0400
commit3e02ea0db997b5572a3ba25fed30660bc1638e1a (patch)
tree8a6c5312bf12f2dfbd9b078b1043d166006d26e5
parent2cfac399e94451ae6230b28d4ec96645622039b8 (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/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 {
275 MTD_FILE_MODE_RAW, 275 MTD_FILE_MODE_RAW,
276}; 276};
277 277
278static inline int mtd_type_is_nand_user(const struct mtd_info_user *mtd)
279{
280 return mtd->type == MTD_NANDFLASH || mtd->type == MTD_MLCNANDFLASH;
281}
282
278#endif /* __MTD_ABI_H__ */ 283#endif /* __MTD_ABI_H__ */