Back to home page

OSCL-LXR

 
 

    


0001 /* SPDX-License-Identifier: GPL-2.0 */
0002 /*
0003  * These are exported solely for the purpose of mtd_blkdevs.c and mtdchar.c.
0004  * You should not use them for _anything_ else.
0005  */
0006 
0007 extern struct mutex mtd_table_mutex;
0008 extern struct backing_dev_info *mtd_bdi;
0009 
0010 struct mtd_info *__mtd_next_device(int i);
0011 int __must_check add_mtd_device(struct mtd_info *mtd);
0012 int del_mtd_device(struct mtd_info *mtd);
0013 int add_mtd_partitions(struct mtd_info *, const struct mtd_partition *, int);
0014 int del_mtd_partitions(struct mtd_info *);
0015 
0016 struct mtd_partitions;
0017 
0018 int parse_mtd_partitions(struct mtd_info *master, const char * const *types,
0019              struct mtd_part_parser_data *data);
0020 
0021 void mtd_part_parser_cleanup(struct mtd_partitions *parts);
0022 
0023 int __init init_mtdchar(void);
0024 void __exit cleanup_mtdchar(void);
0025 
0026 #define mtd_for_each_device(mtd)            \
0027     for ((mtd) = __mtd_next_device(0);      \
0028          (mtd) != NULL;             \
0029          (mtd) = __mtd_next_device(mtd->index + 1))