aboutsummaryrefslogtreecommitdiff
path: root/drivers/mtd/ubi/scan.c
diff options
context:
space:
mode:
authorIngo Molnar <mingo@elte.hu>2009-01-30 18:23:30 +0100
committerIngo Molnar <mingo@elte.hu>2009-01-30 18:23:30 +0100
commitc43e0e46adf79c321ed3fbf0351e1005fb8a2413 (patch)
tree35b9ab361651f649d3c9aa69f159812eba50d154 /drivers/mtd/ubi/scan.c
parentdba3d36b2f0842ed7f25c33cd3a2ccdb3d0df9db (diff)
parentf2257b70b0f9b2fe8f2afd83fc6798dca75930b8 (diff)
Merge branch 'linus' into core/percpu
Conflicts: kernel/irq/handle.c
Diffstat (limited to 'drivers/mtd/ubi/scan.c')
-rw-r--r--drivers/mtd/ubi/scan.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/drivers/mtd/ubi/scan.c b/drivers/mtd/ubi/scan.c
index ecde202a5a1..c3d653ba5ca 100644
--- a/drivers/mtd/ubi/scan.c
+++ b/drivers/mtd/ubi/scan.c
@@ -42,7 +42,7 @@
#include <linux/err.h>
#include <linux/crc32.h>
-#include <asm/div64.h>
+#include <linux/math64.h>
#include "ubi.h"
#ifdef CONFIG_MTD_UBI_DEBUG_PARANOID
@@ -904,10 +904,8 @@ struct ubi_scan_info *ubi_scan(struct ubi_device *ubi)
dbg_msg("scanning is finished");
/* Calculate mean erase counter */
- if (si->ec_count) {
- do_div(si->ec_sum, si->ec_count);
- si->mean_ec = si->ec_sum;
- }
+ if (si->ec_count)
+ si->mean_ec = div_u64(si->ec_sum, si->ec_count);
if (si->is_empty)
ubi_msg("empty MTD device detected");