From 9d40ac5867b9aefe0722bc1f110b965ff294d30d Mon Sep 17 00:00:00 2001 From: Kevin Date: Sat, 15 Nov 2014 10:00:36 +0800 Subject: add via modify part source code for wm8880 4.4 kitkat --- ANDROID_3.4.5/fs/yaffs2/yaffs_mtdif.c | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) (limited to 'ANDROID_3.4.5/fs/yaffs2/yaffs_mtdif.c') 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 @@ -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) -- cgit