]> Pileus Git - ~andy/linux/blobdiff - drivers/mtd/mtdblock.c
Merge git://git.linux-nfs.org/pub/linux/nfs-2.6
[~andy/linux] / drivers / mtd / mtdblock.c
index 9b0bc20e4d8d5a4cd3b4b3b8c8865b0cc02762e5..04ed34694b147f4c691b046680d0d995186d496f 100644 (file)
@@ -7,7 +7,6 @@
  * (C) 1999-2003 David Woodhouse <dwmw2@infradead.org>
  */
 
-#include <linux/config.h>
 #include <linux/fs.h>
 #include <linux/init.h>
 #include <linux/kernel.h>
@@ -289,7 +288,7 @@ static int mtdblock_open(struct mtd_blktrans_dev *mbd)
 
        mutex_init(&mtdblk->cache_mutex);
        mtdblk->cache_state = STATE_EMPTY;
-       if (mtdblk->mtd->type != MTD_RAM && mtdblk->mtd->erasesize) {
+       if ( !(mtdblk->mtd->flags & MTD_NO_ERASE) && mtdblk->mtd->erasesize) {
                mtdblk->cache_size = mtdblk->mtd->erasesize;
                mtdblk->cache_data = NULL;
        }