Commit 4f8a3ba7 authored by Huang Shijie's avatar Huang Shijie Committed by Brian Norris
Browse files

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: default avatarHuang Shijie <b32955@freescale.com>
Signed-off-by: default avatarBrian Norris <computersforpeace@gmail.com>
parent 818b9739
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -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__ */