aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mtd
diff options
context:
space:
mode:
authorJohn Ogness <john.ogness@linutronix.de>2011-01-21 09:39:02 -0500
committerArtem Bityutskiy <Artem.Bityutskiy@nokia.com>2011-01-26 03:14:17 -0500
commite8cfe009436f9ab6f4234e1f7c406c231747925c (patch)
tree5b076f5ea37c12cfaf17770647f2ecd4cae1a202 /drivers/mtd
parentd4c6381303163e774a72db8c172cdc5c23f01588 (diff)
UBI: cleanup LEB start calculations
Wrong macro was used in calculating the data offset: UBI_EC_HDR_SIZE instead of UBI_VID_HDR_SIZE. The data offset should be VID header offset + VID header size (aligned to the minimum I/O unit). This was not a bug only because currently UBI_EC_HDR_SIZE and UBI_VID_HDR_SIZE have the same value of 64 bytes. Commit message was amended by Artem. Signed-off-by: John Ogness <john.ogness@linutronix.de> Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
Diffstat (limited to 'drivers/mtd')
-rw-r--r--drivers/mtd/ubi/build.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/mtd/ubi/build.c b/drivers/mtd/ubi/build.c
index 5ebe280225d6..ef296350aa8f 100644
--- a/drivers/mtd/ubi/build.c
+++ b/drivers/mtd/ubi/build.c
@@ -711,7 +711,7 @@ static int io_init(struct ubi_device *ubi)
711 } 711 }
712 712
713 /* Similar for the data offset */ 713 /* Similar for the data offset */
714 ubi->leb_start = ubi->vid_hdr_offset + UBI_EC_HDR_SIZE; 714 ubi->leb_start = ubi->vid_hdr_offset + UBI_VID_HDR_SIZE;
715 ubi->leb_start = ALIGN(ubi->leb_start, ubi->min_io_size); 715 ubi->leb_start = ALIGN(ubi->leb_start, ubi->min_io_size);
716 716
717 dbg_msg("vid_hdr_offset %d", ubi->vid_hdr_offset); 717 dbg_msg("vid_hdr_offset %d", ubi->vid_hdr_offset);