diff options
| author | Brian Norris <computersforpeace@gmail.com> | 2015-12-04 18:25:17 -0500 |
|---|---|---|
| committer | Brian Norris <computersforpeace@gmail.com> | 2015-12-09 13:22:09 -0500 |
| commit | 07fd2f871c5e3dfb8ff5eb9c4b44fdb4cf1aeff5 (patch) | |
| tree | eed4f64d55157ba411a5c204436e1aadb82c209d /include/linux/mtd | |
| parent | c42c2710d64381fd48d36b278e0744aa683d93fe (diff) | |
mtd: partitions: pass around 'mtd_partitions' wrapper struct
For some of the core partitioning code, it helps to keep info about the
parsed partition (and who parsed them) together in one place.
Signed-off-by: Brian Norris <computersforpeace@gmail.com>
Diffstat (limited to 'include/linux/mtd')
| -rw-r--r-- | include/linux/mtd/partitions.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/include/linux/mtd/partitions.h b/include/linux/mtd/partitions.h index 6185536daacc..cceaf7bd1537 100644 --- a/include/linux/mtd/partitions.h +++ b/include/linux/mtd/partitions.h | |||
| @@ -73,6 +73,13 @@ struct mtd_part_parser { | |||
| 73 | struct mtd_part_parser_data *); | 73 | struct mtd_part_parser_data *); |
| 74 | }; | 74 | }; |
| 75 | 75 | ||
| 76 | /* Container for passing around a set of parsed partitions */ | ||
| 77 | struct mtd_partitions { | ||
| 78 | const struct mtd_partition *parts; | ||
| 79 | int nr_parts; | ||
| 80 | const struct mtd_part_parser *parser; | ||
| 81 | }; | ||
| 82 | |||
| 76 | extern int __register_mtd_parser(struct mtd_part_parser *parser, | 83 | extern int __register_mtd_parser(struct mtd_part_parser *parser, |
| 77 | struct module *owner); | 84 | struct module *owner); |
| 78 | #define register_mtd_parser(parser) __register_mtd_parser(parser, THIS_MODULE) | 85 | #define register_mtd_parser(parser) __register_mtd_parser(parser, THIS_MODULE) |
