summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWolfgang Denk <wd@denx.de>2009-07-07 20:58:30 +0200
committerWolfgang Denk <wd@denx.de>2009-07-07 20:58:30 +0200
commit37572cde7f0bf3f33b6d3b9ed5cc7c479f6802c4 (patch)
treef11051b28115d68ddc2085493a292c999e2fc86f
parentbc1bdab9403c2f3b12c6316d0310f46d31098964 (diff)
parentd318d0c44d8e91e937c4dad0c5b1d2f6bb9d9fd8 (diff)
Merge branch 'master' of git://git.denx.de/u-boot-ubi
-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 4f50b2db62..354e80b528 100644
--- a/drivers/mtd/ubi/build.c
+++ b/drivers/mtd/ubi/build.c
@@ -536,7 +536,7 @@ static int io_init(struct ubi_device *ubi)
*/
ubi->peb_size = ubi->mtd->erasesize;
- ubi->peb_count = ubi->mtd->size / ubi->mtd->erasesize;
+ ubi->peb_count = mtd_div_by_eb(ubi->mtd->size, ubi->mtd);
ubi->flash_size = ubi->mtd->size;
if (ubi->mtd->block_isbad && ubi->mtd->block_markbad)