summaryrefslogtreecommitdiff
path: root/drivers/mtd/ubi/build.c
diff options
context:
space:
mode:
authorStefan Roese <sr@denx.de>2009-06-29 13:30:50 +0200
committerStefan Roese <sr@denx.de>2009-07-07 16:33:44 +0200
commitd318d0c44d8e91e937c4dad0c5b1d2f6bb9d9fd8 (patch)
tree46abe0601eb6341adcf4968c0cd837e88b6b682d /drivers/mtd/ubi/build.c
parent3e88337b225bf796f6df21d0a7f591530e9d4ce0 (diff)
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 <sr@denx.de>
Diffstat (limited to 'drivers/mtd/ubi/build.c')
-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)