summaryrefslogtreecommitdiffstats
path: root/drivers/mtd/ubi/scan.c
diff options
context:
space:
mode:
authorDave Kleikamp <shaggy@linux.vnet.ibm.com>2009-02-02 20:40:55 +0100
committerDave Kleikamp <shaggy@linux.vnet.ibm.com>2009-02-02 20:40:55 +0100
commit8db0c5d5ef3ab99fe9e5151872b75f45c4282e3c (patch)
treeda9759151e00221c58cdd9f4de893c0b08753670 /drivers/mtd/ubi/scan.c
parentjfs: Fix error handling in metapage_writepage() (diff)
parentMerge branch 'header-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/k... (diff)
downloadlinux-8db0c5d5ef3ab99fe9e5151872b75f45c4282e3c.tar.xz
linux-8db0c5d5ef3ab99fe9e5151872b75f45c4282e3c.zip
Merge branch 'master' of /home/shaggy/git/linus-clean/
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 ecde202a5a12..c3d653ba5ca0 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");