Commit
b5b004ad8a0ac6f98bd5708ec8b22fbddd1c1042 caused the sector_size to
be calculated incorrectly when the part size was not hardcoded. This is
because the new code relied on part->size but tried to do the calculation
before it was initialized properly, and it did not take into consideration
the magic SIZE_REMAINING define.
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
part->offset = 0x00000000;
#endif
- part->sector_size = get_part_sector_size(id, part);
-
part->dev = current_mtd_dev;
INIT_LIST_HEAD(&part->link);
if (part->size == SIZE_REMAINING)
part->size = id->size - part->offset;
+ part->sector_size = get_part_sector_size(id, part);
+
DEBUGF("part : name = %s, size = 0x%08lx, offset = 0x%08lx\n",
part->name, part->size, part->offset);