Skip to content

Commit 4f8a3ba

Browse files
Huang Shijiecomputersforpeace
authored andcommitted
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>
1 parent 818b973 commit 4f8a3ba

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

include/uapi/mtd/mtd-abi.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -275,4 +275,9 @@ enum mtd_file_modes {
275275
MTD_FILE_MODE_RAW,
276276
};
277277

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+
278283
#endif /* __MTD_ABI_H__ */

0 commit comments

Comments
 (0)