Skip to content

Commit

Permalink
mtd: bcm63xxpart: don't assume NVRAM is always the fourth partition
Browse files Browse the repository at this point in the history
Instead of referencing the sizes of fixed partitions, use the
precomputed CFE/NVRAM lengths.

Signed-off-by: Jonas Gorski <jonas.gorski@gmail.com>
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@linux.intel.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
  • Loading branch information
Jonas Gorski authored and David Woodhouse committed Jan 9, 2012
1 parent 678eb9b commit 327c62c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/mtd/bcm63xxpart.c
Original file line number Diff line number Diff line change
Expand Up @@ -165,8 +165,8 @@ static int bcm63xx_parse_cfe_partitions(struct mtd_info *master,
/* Global partition "linux" to make easy firmware upgrade */
curpart++;
parts[curpart].name = "linux";
parts[curpart].offset = parts[0].size;
parts[curpart].size = master->size - parts[0].size - parts[3].size;
parts[curpart].offset = cfelen;
parts[curpart].size = master->size - cfelen - nvramlen;

for (i = 0; i < nrparts; i++)
pr_info("Partition %d is %s offset %lx and length %lx\n", i,
Expand Down

0 comments on commit 327c62c

Please sign in to comment.