diff options
author | Dmitry Eremin-Solenikov <dbaryshkov@gmail.com> | 2011-06-10 10:18:28 -0400 |
---|---|---|
committer | Artem Bityutskiy <artem.bityutskiy@intel.com> | 2011-09-11 08:02:10 -0400 |
commit | c7975330154af17aecc167b33ca866b6b3d98918 (patch) | |
tree | b9895816b3f9bd53758410754ad1b1061986a8dd /drivers/mtd/mtdpart.c | |
parent | f722013ee9fd24623df31dec9a91a6d02c3e2f2f (diff) |
mtd: abstract last MTD partition parser argument
Encapsulate last MTD partition parser argument into a separate
structure. Currently it holds only 'origin' field for RedBoot parser,
but will be extended in future to contain at least device_node for OF
devices.
Amended commentary to make kerneldoc happy
Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
Signed-off-by: Artem Bityutskiy <dedekind1@gmail.com>
Diffstat (limited to 'drivers/mtd/mtdpart.c')
-rw-r--r-- | drivers/mtd/mtdpart.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/mtd/mtdpart.c b/drivers/mtd/mtdpart.c index 2b71ccb00d39..34d582c2bdf3 100644 --- a/drivers/mtd/mtdpart.c +++ b/drivers/mtd/mtdpart.c | |||
@@ -736,7 +736,7 @@ static const char *default_mtd_part_types[] = {"cmdlinepart", NULL}; | |||
736 | * @master: the master partition (describes whole MTD device) | 736 | * @master: the master partition (describes whole MTD device) |
737 | * @types: names of partition parsers to try or %NULL | 737 | * @types: names of partition parsers to try or %NULL |
738 | * @pparts: array of partitions found is returned here | 738 | * @pparts: array of partitions found is returned here |
739 | * @origin: MTD device start address (use %0 if unsure) | 739 | * @data: MTD partition parser-specific data |
740 | * | 740 | * |
741 | * This function tries to find partition on MTD device @master. It uses MTD | 741 | * This function tries to find partition on MTD device @master. It uses MTD |
742 | * partition parsers, specified in @types. However, if @types is %NULL, then | 742 | * partition parsers, specified in @types. However, if @types is %NULL, then |
@@ -750,7 +750,8 @@ static const char *default_mtd_part_types[] = {"cmdlinepart", NULL}; | |||
750 | * point to an array containing this number of &struct mtd_info objects. | 750 | * point to an array containing this number of &struct mtd_info objects. |
751 | */ | 751 | */ |
752 | int parse_mtd_partitions(struct mtd_info *master, const char **types, | 752 | int parse_mtd_partitions(struct mtd_info *master, const char **types, |
753 | struct mtd_partition **pparts, unsigned long origin) | 753 | struct mtd_partition **pparts, |
754 | struct mtd_part_parser_data *data) | ||
754 | { | 755 | { |
755 | struct mtd_part_parser *parser; | 756 | struct mtd_part_parser *parser; |
756 | int ret = 0; | 757 | int ret = 0; |
@@ -764,7 +765,7 @@ int parse_mtd_partitions(struct mtd_info *master, const char **types, | |||
764 | parser = get_partition_parser(*types); | 765 | parser = get_partition_parser(*types); |
765 | if (!parser) | 766 | if (!parser) |
766 | continue; | 767 | continue; |
767 | ret = (*parser->parse_fn)(master, pparts, origin); | 768 | ret = (*parser->parse_fn)(master, pparts, data); |
768 | if (ret > 0) { | 769 | if (ret > 0) { |
769 | printk(KERN_NOTICE "%d %s partitions found on MTD device %s\n", | 770 | printk(KERN_NOTICE "%d %s partitions found on MTD device %s\n", |
770 | ret, parser->name, master->name); | 771 | ret, parser->name, master->name); |