1356d70f1SBen Dooks /* linux/drivers/mtd/mtdcore.h 2356d70f1SBen Dooks * 3356d70f1SBen Dooks * Header file for driver private mtdcore exports 4356d70f1SBen Dooks * 5356d70f1SBen Dooks */ 6356d70f1SBen Dooks 7356d70f1SBen Dooks /* These are exported solely for the purpose of mtd_blkdevs.c. You 8356d70f1SBen Dooks should not use them for _anything_ else */ 9356d70f1SBen Dooks 10356d70f1SBen Dooks extern struct mutex mtd_table_mutex; 11b520e412SBen Hutchings extern struct mtd_info *__mtd_next_device(int i); 12f1332ba2SBen Hutchings 13eea72d5fSJamie Iles extern int add_mtd_device(struct mtd_info *mtd); 14eea72d5fSJamie Iles extern int del_mtd_device(struct mtd_info *mtd); 15eea72d5fSJamie Iles extern int add_mtd_partitions(struct mtd_info *, const struct mtd_partition *, 16eea72d5fSJamie Iles int); 17eea72d5fSJamie Iles extern int del_mtd_partitions(struct mtd_info *); 18*3165f44bSDmitry Eremin-Solenikov extern int parse_mtd_partitions(struct mtd_info *master, const char **types, 19*3165f44bSDmitry Eremin-Solenikov struct mtd_partition **pparts, 20*3165f44bSDmitry Eremin-Solenikov struct mtd_part_parser_data *data); 21eea72d5fSJamie Iles 22f1332ba2SBen Hutchings #define mtd_for_each_device(mtd) \ 23f1332ba2SBen Hutchings for ((mtd) = __mtd_next_device(0); \ 24f1332ba2SBen Hutchings (mtd) != NULL; \ 25f1332ba2SBen Hutchings (mtd) = __mtd_next_device(mtd->index + 1)) 26