diff options
author | Stefan Roese <sr@denx.de> | 2009-06-29 13:30:50 +0200 |
---|---|---|
committer | Stefan Roese <sr@denx.de> | 2009-07-07 16:33:44 +0200 |
commit | d318d0c44d8e91e937c4dad0c5b1d2f6bb9d9fd8 (patch) | |
tree | 46abe0601eb6341adcf4968c0cd837e88b6b682d /drivers/mtd/ubi/build.c | |
parent | 3e88337b225bf796f6df21d0a7f591530e9d4ce0 (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.c | 2 |
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) |