Skip to contentSkip to conversation

UBI: Fix build problem noticed on Apollon (arm/testing repo)

PATCH New Stefan Roese 2 participants 3 messages Jun 29, 2009 – Jul 7, 2009

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 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.

---
 drivers/mtd/ubi/build.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/mtd/ubi/build.c +1 -1
index 4f50b2d..354e80b 100644
@@ -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)
Signature · 1 line
1.6.3.3
#2 lore raw

PATCH 1/1 UBI: Fix build problem noticed on Apollon (arm/testing repo)

In reply to Stefan Roese
Quoted 4 lines · On Monday 29 June 2009 13:30:50 Stefan Roese wrote:

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.

Applied to u-boot-ubi. Thanks.

Best regards,
Stefan

=====================================================================
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-0 Fax: +49-8142-66989-80 Email: office at denx.de
=====================================================================