yaffs Normalized headers for release branch.
[yaffs2.git] / yaffs_guts.c
index f910f386dfdb5a33d86a19b4069ee951d887e804..ebe7e772ea7a86a2177c4be11604d449db8a11b8 100644 (file)
@@ -10,6 +10,7 @@
  * it under the terms of the GNU General Public License version 2 as
  * published by the Free Software Foundation.
  */
+
 #include "yportenv.h"
 #include "yaffs_trace.h"
 
@@ -431,9 +432,9 @@ static int yaffs_WriteNewChunkWithTagsToNAND(struct yaffs_DeviceStruct *dev,
                /* let's give it a try */
                attempts++;
 
-#ifdef CONFIG_YAFFS_ALWAYS_CHECK_CHUNK_ERASED
-               bi->skipErasedCheck = 0;
-#endif
+               if(dev->param.alwaysCheckErased)
+                       bi->skipErasedCheck = 0;
+
                if (!bi->skipErasedCheck) {
                        erasedOk = yaffs_CheckChunkErased(dev, chunk);
                        if (erasedOk != YAFFS_OK) {