1cb70783cSArtem Bityutskiy /* 2660685d9SArtem Bityutskiy * These are exported solely for the purpose of mtd_blkdevs.c and mtdchar.c. 3660685d9SArtem Bityutskiy * You should not use them for _anything_ else. 4356d70f1SBen Dooks */ 5356d70f1SBen Dooks 6356d70f1SBen Dooks extern struct mutex mtd_table_mutex; 7f1332ba2SBen Hutchings 8cb70783cSArtem Bityutskiy struct mtd_info *__mtd_next_device(int i); 9cb70783cSArtem Bityutskiy int add_mtd_device(struct mtd_info *mtd); 10cb70783cSArtem Bityutskiy int del_mtd_device(struct mtd_info *mtd); 11cb70783cSArtem Bityutskiy int add_mtd_partitions(struct mtd_info *, const struct mtd_partition *, int); 12cb70783cSArtem Bityutskiy int del_mtd_partitions(struct mtd_info *); 13*07fd2f87SBrian Norris 14*07fd2f87SBrian Norris struct mtd_partitions; 15*07fd2f87SBrian Norris 16cb70783cSArtem Bityutskiy int parse_mtd_partitions(struct mtd_info *master, const char * const *types, 17*07fd2f87SBrian Norris struct mtd_partitions *pparts, 183165f44bSDmitry Eremin-Solenikov struct mtd_part_parser_data *data); 19eea72d5fSJamie Iles 20660685d9SArtem Bityutskiy int __init init_mtdchar(void); 21660685d9SArtem Bityutskiy void __exit cleanup_mtdchar(void); 22660685d9SArtem Bityutskiy 23f1332ba2SBen Hutchings #define mtd_for_each_device(mtd) \ 24f1332ba2SBen Hutchings for ((mtd) = __mtd_next_device(0); \ 25f1332ba2SBen Hutchings (mtd) != NULL; \ 26f1332ba2SBen Hutchings (mtd) = __mtd_next_device(mtd->index + 1)) 27