From: Stefan Roese Date: Mon, 29 Jun 2009 11:30:50 +0000 (+0200) Subject: UBI: Fix build problem noticed on Apollon (arm/testing repo) X-Git-Tag: v2009.08-rc1~120^2 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=d318d0c44d8e91e937c4dad0c5b1d2f6bb9d9fd8;p=oweals%2Fu-boot.git UBI: Fix build problem noticed on Apollon (arm/testing repo) This patch fixes a build problem noticed on Apollon by using mtd_dev_by_eb() instead of "/" as done in the Linux UBI version. So this brings the U-Boot UBI version more in sync with the Linux version again. Signed-off-by: Stefan Roese --- 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)