diff options
author | Jonas Gorski <jonas.gorski@gmail.com> | 2011-12-17 07:58:16 -0500 |
---|---|---|
committer | David Woodhouse <David.Woodhouse@intel.com> | 2012-01-09 13:20:58 -0500 |
commit | 327c62c554a78af399938445094a7dc834b7fd0b (patch) | |
tree | ce9a731c807cbb379615a04079e1ed7e73746d8c /drivers/mtd/bcm63xxpart.c | |
parent | 678eb9bb8114c47a7b89fd1288ff5dc760c53c1c (diff) |
mtd: bcm63xxpart: don't assume NVRAM is always the fourth partition
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>
Diffstat (limited to 'drivers/mtd/bcm63xxpart.c')
-rw-r--r-- | drivers/mtd/bcm63xxpart.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/mtd/bcm63xxpart.c b/drivers/mtd/bcm63xxpart.c index 17e137080a6b..6afc4aa3c622 100644 --- a/drivers/mtd/bcm63xxpart.c +++ b/drivers/mtd/bcm63xxpart.c | |||
@@ -165,8 +165,8 @@ static int bcm63xx_parse_cfe_partitions(struct mtd_info *master, | |||
165 | /* Global partition "linux" to make easy firmware upgrade */ | 165 | /* Global partition "linux" to make easy firmware upgrade */ |
166 | curpart++; | 166 | curpart++; |
167 | parts[curpart].name = "linux"; | 167 | parts[curpart].name = "linux"; |
168 | parts[curpart].offset = parts[0].size; | 168 | parts[curpart].offset = cfelen; |
169 | parts[curpart].size = master->size - parts[0].size - parts[3].size; | 169 | parts[curpart].size = master->size - cfelen - nvramlen; |
170 | 170 | ||
171 | for (i = 0; i < nrparts; i++) | 171 | for (i = 0; i < nrparts; i++) |
172 | pr_info("Partition %d is %s offset %lx and length %lx\n", i, | 172 | pr_info("Partition %d is %s offset %lx and length %lx\n", i, |