Add yaffs_utime and related code
[yaffs2.git] / yaffs_mtdif.c
index b36a8bec42160c7da5a1d8f73ff57c4aaca9e864..edc152575302e72a2339e58a730e57e40e028bcc 100644 (file)
@@ -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>
@@ -26,8 +26,8 @@ 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) block_no) * dev->param.total_bytes_per_chunk *
+           dev->param.chunks_per_block;
        struct erase_info ei;
        int retval = 0;
 
@@ -43,8 +43,8 @@ int nandmtd_erase_block(struct yaffs_dev *dev, int block_no)
 
        if (retval == 0)
                return YAFFS_OK;
-       else
-               return YAFFS_FAIL;
+
+       return YAFFS_FAIL;
 }
 
 int nandmtd_initialise(struct yaffs_dev *dev)