diff options
author | Dmitry Eremin-Solenikov <dbaryshkov@gmail.com> | 2011-06-10 18:18:28 +0400 |
---|---|---|
committer | Artem Bityutskiy <artem.bityutskiy@intel.com> | 2011-09-11 15:02:10 +0300 |
commit | c7975330154af17aecc167b33ca866b6b3d98918 (patch) | |
tree | b9895816b3f9bd53758410754ad1b1061986a8dd /drivers/mtd/redboot.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/redboot.c')
-rw-r--r-- | drivers/mtd/redboot.c | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/drivers/mtd/redboot.c b/drivers/mtd/redboot.c index 7a87d07cd79..56e48ea7ff0 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) } static int parse_redboot_partitions(struct mtd_info *master, - struct mtd_partition **pparts, - unsigned long fis_origin) + struct mtd_partition **pparts, + struct mtd_part_parser_data *data) { int nrparts = 0; struct fis_image_desc *buf; @@ -197,11 +197,10 @@ static int parse_redboot_partitions(struct mtd_info *master, goto out; } new_fl->img = &buf[i]; - if (fis_origin) { - buf[i].flash_base -= fis_origin; - } else { - buf[i].flash_base &= master->size-1; - } + if (data && data->origin) + buf[i].flash_base -= data->origin; + else + buf[i].flash_base &= master->size-1; /* I'm sure the JFFS2 code has done me permanent damage. * I now think the following is _normal_ |