yaffs Clean up some code
[yaffs2.git] / yaffs_guts.c
index f910f386dfdb5a33d86a19b4069ee951d887e804..7e97a5f0eadc0aad888f3ed30c92cf7b1563c3d9 100644 (file)
@@ -431,9 +431,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) {