summaryrefslogtreecommitdiff
path: root/drivers/mtd
diff options
context:
space:
mode:
authorRichard Weinberger <richard@nod.at>2014-09-30 02:20:46 +0400
committerArtem Bityutskiy <artem.bityutskiy@linux.intel.com>2014-10-03 18:33:28 +0400
commit91401a34038e614076dbfb5c4969a052e72fb296 (patch)
tree67a08a15cc73324c25cdcf7907b09480581bc359 /drivers/mtd
parent443b39cdd5c37661bf681858b327418c3a5b9d76 (diff)
downloadlinux-91401a34038e614076dbfb5c4969a052e72fb296.tar.xz
UBI: Fastmap: Calc fastmap size correctly
We need to add fm_sb too. Signed-off-by: Richard Weinberger <richard@nod.at> Reviewed-by: Tanya Brokhman <tlinder@codeaurora.org> Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Diffstat (limited to 'drivers/mtd')
-rw-r--r--drivers/mtd/ubi/fastmap.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/mtd/ubi/fastmap.c b/drivers/mtd/ubi/fastmap.c
index c701369090fb..cfd5b5e90156 100644
--- a/drivers/mtd/ubi/fastmap.c
+++ b/drivers/mtd/ubi/fastmap.c
@@ -24,7 +24,8 @@ size_t ubi_calc_fm_size(struct ubi_device *ubi)
{
size_t size;
- size = sizeof(struct ubi_fm_hdr) + \
+ size = sizeof(struct ubi_fm_sb) + \
+ sizeof(struct ubi_fm_hdr) + \
sizeof(struct ubi_fm_scan_pool) + \
sizeof(struct ubi_fm_scan_pool) + \
(ubi->peb_count * sizeof(struct ubi_fm_ec)) + \