Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Huang Shijie and committed by
Brian Norris
4f8a3ba7 818b9739

+5
+5
include/uapi/mtd/mtd-abi.h
··· 275 275 MTD_FILE_MODE_RAW, 276 276 }; 277 277 278 + static 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 283 #endif /* __MTD_ABI_H__ */