diff options
author | Dmitry Eremin-Solenikov <dbaryshkov@gmail.com> | 2011-05-29 13:32:33 -0400 |
---|---|---|
committer | Artem Bityutskiy <artem.bityutskiy@intel.com> | 2011-09-11 08:02:10 -0400 |
commit | d26c87d64eff271146b40b66c7de8cfeaf956707 (patch) | |
tree | 7ca79171866e124522212cd92256016db6b8fecf /include | |
parent | c7975330154af17aecc167b33ca866b6b3d98918 (diff) |
mtd: prepare to convert of_mtd_parse_partitions to partition parser
Prepare to convert of_mtd_parse_partitions() to usual partitions parser:
1) Register ofpart parser
2) Internally don't use passed device for error printing
3) Add device_node to mtd_part_parser_data struct
4) Move of_mtd_parse_partitions from __devinit to common text section
5) add ofpart to the default list of partition parsers
Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
Signed-off-by: Artem Bityutskiy <dedekind1@gmail.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/mtd/partitions.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/include/linux/mtd/partitions.h b/include/linux/mtd/partitions.h index 5fdb963a5035..ec60fd14670c 100644 --- a/include/linux/mtd/partitions.h +++ b/include/linux/mtd/partitions.h | |||
@@ -51,13 +51,16 @@ struct mtd_partition { | |||
51 | 51 | ||
52 | 52 | ||
53 | struct mtd_info; | 53 | struct mtd_info; |
54 | struct device_node; | ||
54 | 55 | ||
55 | /** | 56 | /** |
56 | * struct mtd_part_parser_data - used to pass data to MTD partition parsers. | 57 | * struct mtd_part_parser_data - used to pass data to MTD partition parsers. |
57 | * @origin: for RedBoot, start address of MTD device | 58 | * @origin: for RedBoot, start address of MTD device |
59 | * @of_node: for OF parsers, device node containing partitioning information | ||
58 | */ | 60 | */ |
59 | struct mtd_part_parser_data { | 61 | struct mtd_part_parser_data { |
60 | unsigned long origin; | 62 | unsigned long origin; |
63 | struct device_node *of_node; | ||
61 | }; | 64 | }; |
62 | 65 | ||
63 | 66 | ||
@@ -85,7 +88,7 @@ struct device; | |||
85 | struct device_node; | 88 | struct device_node; |
86 | 89 | ||
87 | #ifdef CONFIG_MTD_OF_PARTS | 90 | #ifdef CONFIG_MTD_OF_PARTS |
88 | int __devinit of_mtd_parse_partitions(struct device *dev, | 91 | int of_mtd_parse_partitions(struct device *dev, |
89 | struct device_node *node, | 92 | struct device_node *node, |
90 | struct mtd_partition **pparts); | 93 | struct mtd_partition **pparts); |
91 | #else | 94 | #else |