Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 360351
b: refs/heads/master
c: 648bdbe
h: refs/heads/master
i:
  360349: 8c448f2
  360347: 15602a9
  360343: 49e4921
  360335: c543b2c
  360319: 0e13771
v: v3
  • Loading branch information
Rafał Miłecki authored and Artem Bityutskiy committed Feb 4, 2013
1 parent f170eeb commit 086cdec
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 55bf75b7dd8ec875d048824f3cdecf8254e292e5
refs/heads/master: 648bdbee5d2cc3ff27370d05e7577ade8496bfd0
11 changes: 6 additions & 5 deletions trunk/drivers/mtd/bcm47xxpart.c
Original file line number Diff line number Diff line change
Expand Up @@ -169,11 +169,12 @@ static int bcm47xxpart_parse(struct mtd_info *master,
* Assume that partitions end at the beginning of the one they are
* followed by.
*/
for (i = 0; i < curr_part - 1; i++)
parts[i].size = parts[i + 1].offset - parts[i].offset;
if (curr_part > 0)
parts[curr_part - 1].size =
master->size - parts[curr_part - 1].offset;
for (i = 0; i < curr_part; i++) {
u64 next_part_offset = (i < curr_part - 1) ?
parts[i + 1].offset : master->size;

parts[i].size = next_part_offset - parts[i].offset;
}

*pparts = parts;
return curr_part;
Expand Down

0 comments on commit 086cdec

Please sign in to comment.