diff options
author | Artem Bityutskiy <Artem.Bityutskiy@nokia.com> | 2008-01-17 14:41:14 +0100 |
---|---|---|
committer | Artem Bityutskiy <Artem.Bityutskiy@nokia.com> | 2008-01-25 15:41:24 +0100 |
commit | d536058752274b2fe60135142da550b5355ffa94 (patch) | |
tree | c3b2bb4a3097a06c1ed085e202cdff87f8a2d564 /drivers/mtd | |
parent | UBI: amend array size (diff) | |
download | linux-d536058752274b2fe60135142da550b5355ffa94.tar.xz linux-d536058752274b2fe60135142da550b5355ffa94.zip |
UBI: bugfix: calculate data offset properly
Data offset is VID header offset + VID header size aligned to
the min. I/O unit size up.
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
Diffstat (limited to 'drivers/mtd')
-rw-r--r-- | drivers/mtd/ubi/build.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/mtd/ubi/build.c b/drivers/mtd/ubi/build.c index 51bff88342af..6ac81e35355c 100644 --- a/drivers/mtd/ubi/build.c +++ b/drivers/mtd/ubi/build.c @@ -562,7 +562,7 @@ static int io_init(struct ubi_device *ubi) } /* Similar for the data offset */ - ubi->leb_start = ubi->vid_hdr_offset + ubi->vid_hdr_alsize; + ubi->leb_start = ubi->vid_hdr_offset + UBI_EC_HDR_SIZE; ubi->leb_start = ALIGN(ubi->leb_start, ubi->min_io_size); dbg_msg("vid_hdr_offset %d", ubi->vid_hdr_offset); |