aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'drivers')
-rw-r--r--drivers/mtd/afs.c4
-rw-r--r--drivers/mtd/ar7part.c2
-rw-r--r--drivers/mtd/cmdlinepart.c4
-rw-r--r--drivers/mtd/mtdcore.c6
-rw-r--r--drivers/mtd/mtdpart.c7
-rw-r--r--drivers/mtd/redboot.c13
6 files changed, 18 insertions, 18 deletions
diff --git a/drivers/mtd/afs.c b/drivers/mtd/afs.c
index 302372c08b56..89a02f6f65dc 100644
--- a/drivers/mtd/afs.c
+++ b/drivers/mtd/afs.c
@@ -162,8 +162,8 @@ afs_read_iis(struct mtd_info *mtd, struct image_info_struct *iis, u_int ptr)
162} 162}
163 163
164static int parse_afs_partitions(struct mtd_info *mtd, 164static int parse_afs_partitions(struct mtd_info *mtd,
165 struct mtd_partition **pparts, 165 struct mtd_partition **pparts,
166 unsigned long origin) 166 struct mtd_part_parser_data *data)
167{ 167{
168 struct mtd_partition *parts; 168 struct mtd_partition *parts;
169 u_int mask, off, idx, sz; 169 u_int mask, off, idx, sz;
diff --git a/drivers/mtd/ar7part.c b/drivers/mtd/ar7part.c
index 6697a1ec72d0..71bfa2efb3ea 100644
--- a/drivers/mtd/ar7part.c
+++ b/drivers/mtd/ar7part.c
@@ -46,7 +46,7 @@ struct ar7_bin_rec {
46 46
47static int create_mtd_partitions(struct mtd_info *master, 47static int create_mtd_partitions(struct mtd_info *master,
48 struct mtd_partition **pparts, 48 struct mtd_partition **pparts,
49 unsigned long origin) 49 struct mtd_part_parser_data *data)
50{ 50{
51 struct ar7_bin_rec header; 51 struct ar7_bin_rec header;
52 unsigned int offset; 52 unsigned int offset;
diff --git a/drivers/mtd/cmdlinepart.c b/drivers/mtd/cmdlinepart.c
index be0c121f2f1b..1b11f94695e9 100644
--- a/drivers/mtd/cmdlinepart.c
+++ b/drivers/mtd/cmdlinepart.c
@@ -313,8 +313,8 @@ static int mtdpart_setup_real(char *s)
313 * the first one in the chain if a NULL mtd_id is passed in. 313 * the first one in the chain if a NULL mtd_id is passed in.
314 */ 314 */
315static int parse_cmdline_partitions(struct mtd_info *master, 315static int parse_cmdline_partitions(struct mtd_info *master,
316 struct mtd_partition **pparts, 316 struct mtd_partition **pparts,
317 unsigned long origin) 317 struct mtd_part_parser_data *data)
318{ 318{
319 unsigned long offset; 319 unsigned long offset;
320 int i; 320 int i;
diff --git a/drivers/mtd/mtdcore.c b/drivers/mtd/mtdcore.c
index 13267477e4e9..e18639980f7a 100644
--- a/drivers/mtd/mtdcore.c
+++ b/drivers/mtd/mtdcore.c
@@ -457,7 +457,7 @@ EXPORT_SYMBOL_GPL(mtd_device_register);
457 * @mtd: the MTD device to register 457 * @mtd: the MTD device to register
458 * @types: the list of MTD partition probes to try, see 458 * @types: the list of MTD partition probes to try, see
459 * 'parse_mtd_partitions()' for more information 459 * 'parse_mtd_partitions()' for more information
460 * @origin: start address of MTD device, %0 unless you are sure you need this. 460 * @parser_data: MTD partition parser-specific data
461 * @parts: fallback partition information to register, if parsing fails; 461 * @parts: fallback partition information to register, if parsing fails;
462 * only valid if %nr_parts > %0 462 * only valid if %nr_parts > %0
463 * @nr_parts: the number of partitions in parts, if zero then the full 463 * @nr_parts: the number of partitions in parts, if zero then the full
@@ -480,14 +480,14 @@ EXPORT_SYMBOL_GPL(mtd_device_register);
480 * Returns zero in case of success and a negative error code in case of failure. 480 * Returns zero in case of success and a negative error code in case of failure.
481 */ 481 */
482int mtd_device_parse_register(struct mtd_info *mtd, const char **types, 482int mtd_device_parse_register(struct mtd_info *mtd, const char **types,
483 unsigned long origin, 483 struct mtd_part_parser_data *parser_data,
484 const struct mtd_partition *parts, 484 const struct mtd_partition *parts,
485 int nr_parts) 485 int nr_parts)
486{ 486{
487 int err; 487 int err;
488 struct mtd_partition *real_parts; 488 struct mtd_partition *real_parts;
489 489
490 err = parse_mtd_partitions(mtd, types, &real_parts, origin); 490 err = parse_mtd_partitions(mtd, types, &real_parts, parser_data);
491 if (err <= 0 && nr_parts) { 491 if (err <= 0 && nr_parts) {
492 real_parts = kmemdup(parts, sizeof(*parts) * nr_parts, 492 real_parts = kmemdup(parts, sizeof(*parts) * nr_parts,
493 GFP_KERNEL); 493 GFP_KERNEL);
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 */
752int parse_mtd_partitions(struct mtd_info *master, const char **types, 752int 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);
diff --git a/drivers/mtd/redboot.c b/drivers/mtd/redboot.c
index 7a87d07cd79f..56e48ea7ff05 100644
--- a/drivers/mtd/redboot.c
+++ b/drivers/mtd/redboot.c
@@ -56,8 +56,8 @@ static inline int redboot_checksum(struct fis_image_desc *img)
56} 56}
57 57
58static int parse_redboot_partitions(struct mtd_info *master, 58static int parse_redboot_partitions(struct mtd_info *master,
59 struct mtd_partition **pparts, 59 struct mtd_partition **pparts,
60 unsigned long fis_origin) 60 struct mtd_part_parser_data *data)
61{ 61{
62 int nrparts = 0; 62 int nrparts = 0;
63 struct fis_image_desc *buf; 63 struct fis_image_desc *buf;
@@ -197,11 +197,10 @@ static int parse_redboot_partitions(struct mtd_info *master,
197 goto out; 197 goto out;
198 } 198 }
199 new_fl->img = &buf[i]; 199 new_fl->img = &buf[i];
200 if (fis_origin) { 200 if (data && data->origin)
201 buf[i].flash_base -= fis_origin; 201 buf[i].flash_base -= data->origin;
202 } else { 202 else
203 buf[i].flash_base &= master->size-1; 203 buf[i].flash_base &= master->size-1;
204 }
205 204
206 /* I'm sure the JFFS2 code has done me permanent damage. 205 /* I'm sure the JFFS2 code has done me permanent damage.
207 * I now think the following is _normal_ 206 * I now think the following is _normal_