summaryrefslogtreecommitdiff
path: root/fs/yaffs2/yaffsfs.c
diff options
context:
space:
mode:
authorTom Rini <trini@ti.com>2013-12-05 14:48:39 -0500
committerTom Rini <trini@ti.com>2013-12-13 09:16:20 -0500
commit6b44adc22e6f4cc4fe8e1bb6c69b6bf8ec8da533 (patch)
tree13a49070f11ef52c23b4ff96b2fda98564aec025 /fs/yaffs2/yaffsfs.c
parent18e8672449d812ba7791f166245bc45eab30dbf9 (diff)
yaffs2: Use lldiv for 64bit division
Signed-off-by: Tom Rini <trini@ti.com>
Diffstat (limited to 'fs/yaffs2/yaffsfs.c')
-rw-r--r--fs/yaffs2/yaffsfs.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/fs/yaffs2/yaffsfs.c b/fs/yaffs2/yaffsfs.c
index ac4a010bdf..334598eedf 100644
--- a/fs/yaffs2/yaffsfs.c
+++ b/fs/yaffs2/yaffsfs.c
@@ -11,6 +11,7 @@
* published by the Free Software Foundation.
*/
+#include <div64.h>
#include "yaffsfs.h"
#include "yaffs_guts.h"
#include "yaffscfg.h"
@@ -1603,8 +1604,8 @@ static int yaffsfs_DoStat(struct yaffs_obj *obj, struct yaffs_stat *buf)
buf->st_rdev = obj->yst_rdev;
buf->st_size = yaffs_get_obj_length(obj);
buf->st_blksize = obj->my_dev->data_bytes_per_chunk;
- buf->st_blocks = (buf->st_size + buf->st_blksize - 1) /
- buf->st_blksize;
+ buf->st_blocks = lldiv(buf->st_size + buf->st_blksize - 1,
+ buf->st_blksize);
#if CONFIG_YAFFS_WINCE
buf->yst_wince_atime[0] = obj->win_atime[0];
buf->yst_wince_atime[1] = obj->win_atime[1];