History

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();

Huang Shijie committed 13 years ago

Commit 4f8a3ba1 parent 818b9731 file · +5 −0Browse files

Unified · Split

include/uapi/mtd/mtd-abi.h+5−0
@@ -275,4 +275,9 @@ enum mtd_file_modes { · 274 unmodified lines
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__ */