diff options
Diffstat (limited to 'drivers/mtd/ubi/build.c')
-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 c7630a228310..634e2e86525f 100644 --- a/drivers/mtd/ubi/build.c +++ b/drivers/mtd/ubi/build.c | |||
@@ -561,7 +561,7 @@ static int io_init(struct ubi_device *ubi) | |||
561 | */ | 561 | */ |
562 | 562 | ||
563 | ubi->peb_size = ubi->mtd->erasesize; | 563 | ubi->peb_size = ubi->mtd->erasesize; |
564 | ubi->peb_count = ubi->mtd->size / ubi->mtd->erasesize; | 564 | ubi->peb_count = mtd_div_by_eb(ubi->mtd->size, ubi->mtd); |
565 | ubi->flash_size = ubi->mtd->size; | 565 | ubi->flash_size = ubi->mtd->size; |
566 | 566 | ||
567 | if (ubi->mtd->block_isbad && ubi->mtd->block_markbad) | 567 | if (ubi->mtd->block_isbad && ubi->mtd->block_markbad) |