diff options
Diffstat (limited to 'include/linux/mtd/partitions.h')
-rw-r--r-- | include/linux/mtd/partitions.h | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/include/linux/mtd/partitions.h b/include/linux/mtd/partitions.h index 8421520c10eb..d002d9b5d797 100644 --- a/include/linux/mtd/partitions.h +++ b/include/linux/mtd/partitions.h @@ -73,9 +73,21 @@ struct mtd_part_parser { struct mtd_part_parser_data *); }; -extern void register_mtd_parser(struct mtd_part_parser *parser); +extern int __register_mtd_parser(struct mtd_part_parser *parser, + struct module *owner); +#define register_mtd_parser(parser) __register_mtd_parser(parser, THIS_MODULE) + extern void deregister_mtd_parser(struct mtd_part_parser *parser); +/* + * module_mtd_part_parser() - Helper macro for MTD partition parsers that don't + * do anything special in module init/exit. Each driver may only use this macro + * once, and calling it replaces module_init() and module_exit(). + */ +#define module_mtd_part_parser(__mtd_part_parser) \ + module_driver(__mtd_part_parser, register_mtd_parser, \ + deregister_mtd_parser) + int mtd_is_partition(const struct mtd_info *mtd); int mtd_add_partition(struct mtd_info *master, const char *name, long long offset, long long length); |