Revert to Fedora kernel-2.6.17-1.2187_FC5 patched with vs2.0.2.1; there are too many...
[linux-2.6.git] / drivers / mtd / mtdblock_ro.c
index 29563ed..0c830ba 100644 (file)
@@ -45,7 +45,9 @@ static void mtdblock_add_mtd(struct mtd_blktrans_ops *tr, struct mtd_info *mtd)
        dev->blksize = 512;
        dev->size = mtd->size >> 9;
        dev->tr = tr;
-       dev->readonly = 1;
+       if ((mtd->flags & (MTD_CLEAR_BITS|MTD_SET_BITS|MTD_WRITEABLE)) !=
+           (MTD_CLEAR_BITS|MTD_SET_BITS|MTD_WRITEABLE))
+               dev->readonly = 1;
 
        add_mtd_blktrans_dev(dev);
 }