summaryrefslogtreecommitdiffstats
path: root/fs/yaffs2/yaffs_uboot_glue.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/yaffs2/yaffs_uboot_glue.c')
-rw-r--r--fs/yaffs2/yaffs_uboot_glue.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/yaffs2/yaffs_uboot_glue.c b/fs/yaffs2/yaffs_uboot_glue.c
index e113e4039e..50000a135b 100644
--- a/fs/yaffs2/yaffs_uboot_glue.c
+++ b/fs/yaffs2/yaffs_uboot_glue.c
@@ -20,6 +20,7 @@
*/
#include <common.h>
+#include <div64.h>
#include <config.h>
#include "nand.h"
@@ -184,7 +185,7 @@ void cmd_yaffs_devconfig(char *_mp, int flash_dev,
}
if (end_block == 0)
- end_block = mtd->size / mtd->erasesize - 1;
+ end_block = lldiv(mtd->size, mtd->erasesize - 1);
if (end_block < start_block) {
printf("Bad start/end\n");
OpenPOWER on IntegriCloud