]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
mtd: mtd-abi: add a helper to detect the nand type
authorHuang Shijie <b32955@freescale.com>
Wed, 25 Sep 2013 06:58:18 +0000 (14:58 +0800)
committerBrian Norris <computersforpeace@gmail.com>
Sun, 27 Oct 2013 23:27:06 +0000 (16:27 -0700)
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>
include/uapi/mtd/mtd-abi.h

index e89b096856f8e91020aa869fbfc86668433d8ea0..e272ea060e3851959878932ef2dd61c87e9d185e 100644 (file)
@@ -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__ */