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>
This commit is contained in:
committed by
Artem Bityutskiy
parent
c797533015
commit
d26c87d64e
@@ -51,13 +51,16 @@ struct mtd_partition {
|
||||
|
||||
|
||||
struct mtd_info;
|
||||
struct device_node;
|
||||
|
||||
/**
|
||||
* struct mtd_part_parser_data - used to pass data to MTD partition parsers.
|
||||
* @origin: for RedBoot, start address of MTD device
|
||||
* @of_node: for OF parsers, device node containing partitioning information
|
||||
*/
|
||||
struct mtd_part_parser_data {
|
||||
unsigned long origin;
|
||||
struct device_node *of_node;
|
||||
};
|
||||
|
||||
|
||||
@@ -85,7 +88,7 @@ struct device;
|
||||
struct device_node;
|
||||
|
||||
#ifdef CONFIG_MTD_OF_PARTS
|
||||
int __devinit of_mtd_parse_partitions(struct device *dev,
|
||||
int of_mtd_parse_partitions(struct device *dev,
|
||||
struct device_node *node,
|
||||
struct mtd_partition **pparts);
|
||||
#else
|
||||
|
||||
Reference in New Issue
Block a user