summaryrefslogtreecommitdiff
path: root/ANDROID_3.4.5/fs/yaffs2/yaffs_mtdif.c
diff options
context:
space:
mode:
authorKevin2014-11-15 10:00:36 +0800
committerKevin2014-11-15 10:00:36 +0800
commit9d40ac5867b9aefe0722bc1f110b965ff294d30d (patch)
treede942df665fac4bac0d9cb7ae86910fe937b0c1a /ANDROID_3.4.5/fs/yaffs2/yaffs_mtdif.c
parent392e8802486cb573b916e746010e141a75f507e6 (diff)
downloadFOSSEE-netbook-kernel-source-9d40ac5867b9aefe0722bc1f110b965ff294d30d.tar.gz
FOSSEE-netbook-kernel-source-9d40ac5867b9aefe0722bc1f110b965ff294d30d.tar.bz2
FOSSEE-netbook-kernel-source-9d40ac5867b9aefe0722bc1f110b965ff294d30d.zip
add via modify part source code for wm8880 4.4 kitkat
Diffstat (limited to 'ANDROID_3.4.5/fs/yaffs2/yaffs_mtdif.c')
-rw-r--r--ANDROID_3.4.5/fs/yaffs2/yaffs_mtdif.c15
1 files changed, 7 insertions, 8 deletions
diff --git a/ANDROID_3.4.5/fs/yaffs2/yaffs_mtdif.c b/ANDROID_3.4.5/fs/yaffs2/yaffs_mtdif.c
index 7cf53b3d..365fd31f 100644
--- a/ANDROID_3.4.5/fs/yaffs2/yaffs_mtdif.c
+++ b/ANDROID_3.4.5/fs/yaffs2/yaffs_mtdif.c
@@ -1,7 +1,7 @@
/*
* YAFFS: Yet Another Flash File System. A NAND-flash specific file system.
*
- * Copyright (C) 2002-2010 Aleph One Ltd.
+ * Copyright (C) 2002-2011 Aleph One Ltd.
* for Toby Churchill Ltd and Brightstar Engineering
*
* Created by Charles Manning <charles@aleph1.co.uk>
@@ -25,11 +25,10 @@
int nandmtd_erase_block(struct yaffs_dev *dev, int block_no)
{
struct mtd_info *mtd = yaffs_dev_to_mtd(dev);
- u32 addr =
- ((loff_t) block_no) * dev->param.total_bytes_per_chunk
- * dev->param.chunks_per_block;
+ loff_t addr =
+ ((loff_t) block_no) * dev->param.total_bytes_per_chunk *
+ dev->param.chunks_per_block;
struct erase_info ei;
-
int retval = 0;
ei.mtd = mtd;
@@ -40,12 +39,12 @@ int nandmtd_erase_block(struct yaffs_dev *dev, int block_no)
ei.callback = NULL;
ei.priv = (u_long) dev;
- retval = mtd->erase(mtd, &ei);
+ retval = mtd->_erase(mtd, &ei);
if (retval == 0)
return YAFFS_OK;
- else
- return YAFFS_FAIL;
+
+ return YAFFS_FAIL;
}
int nandmtd_initialise(struct yaffs_dev *dev)