diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2009-01-29 18:12:58 -0800 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-01-29 18:12:58 -0800 |
commit | 0d280884961de51afd87465f72ade9e8876d1e26 (patch) | |
tree | fa03d8593ddda2026545b369c4a87397deb7bdca /drivers/mtd/ubi/scan.c | |
parent | 9b4d142d521963ee1c53cefcd1f9790ca32b5db7 (diff) | |
parent | 766fb95ba06e1bbf531d30dc05e21b2d4a0e8dd2 (diff) |
Merge branch 'linux-next' of git://git.infradead.org/ubi-2.6
* 'linux-next' of git://git.infradead.org/ubi-2.6:
UBI: allow direct user-space I/O
UBI: fix resource de-allocation
UBI: remove unused variable
UBI: use nicer 64-bit math
UBI: add ioctl compatibility
UBI: constify file operations
UBI: allow all ioctls
UBI: remove unnecessry header inclusion
UBI: improve ioctl commentaries
UBI: add ioctl for is_mapped operation
UBI: add ioctl for unmap operation
UBI: add ioctl for map operation
Diffstat (limited to 'drivers/mtd/ubi/scan.c')
-rw-r--r-- | drivers/mtd/ubi/scan.c | 8 |
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"); |