]> err.no Git - linux-2.6/commitdiff
Remove unchecked MTD flags
authorJörn Engel <joern@wohnheim.fh-wedel.de>
Thu, 13 Apr 2006 16:54:34 +0000 (18:54 +0200)
committerDavid Woodhouse <dwmw2@infradead.org>
Mon, 17 Apr 2006 14:48:17 +0000 (15:48 +0100)
Several flags are set by some devices, but never checked.  Remove them.

Signed-off-by: Jörn Engel <joern@wohnheim.fh-wedel.de>
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
drivers/mtd/chips/map_ram.c
drivers/mtd/devices/phram.c
drivers/mtd/devices/slram.c
include/mtd/mtd-abi.h

index bd2e876a814bfc6374660379b83503c64be2841e..763925747db6f60a6701aad1b68e2fdecb801457 100644 (file)
@@ -70,7 +70,7 @@ static struct mtd_info *map_ram_probe(struct map_info *map)
        mtd->read = mapram_read;
        mtd->write = mapram_write;
        mtd->sync = mapram_nop;
-       mtd->flags = MTD_CAP_RAM | MTD_VOLATILE;
+       mtd->flags = MTD_CAP_RAM;
 
        mtd->erasesize = PAGE_SIZE;
        while(mtd->size & (mtd->erasesize - 1))
index e8685ee6c1e425f202b8ca2b91ea6de05dc8c8ae..41af9693d880b9ca2947806b2626258cfd6feb1f 100644 (file)
@@ -142,7 +142,7 @@ static int register_device(char *name, unsigned long start, unsigned long len)
 
        new->mtd.name = name;
        new->mtd.size = len;
-       new->mtd.flags = MTD_CAP_RAM | MTD_ERASEABLE | MTD_VOLATILE;
+       new->mtd.flags = MTD_CAP_RAM;
         new->mtd.erase = phram_erase;
        new->mtd.point = phram_point;
        new->mtd.unpoint = phram_unpoint;
index 6faee6c6958c2a7bc709b53df6cf61ff6c507369..b3f665e3c38bfeec5fade51e3c4fb77ee61bc7b4 100644 (file)
@@ -200,8 +200,7 @@ static int register_device(char *name, unsigned long start, unsigned long length
 
        (*curmtd)->mtdinfo->name = name;
        (*curmtd)->mtdinfo->size = length;
-       (*curmtd)->mtdinfo->flags = MTD_CLEAR_BITS | MTD_SET_BITS |
-                                       MTD_WRITEB_WRITEABLE | MTD_VOLATILE | MTD_CAP_RAM;
+       (*curmtd)->mtdinfo->flags = MTD_CAP_RAM;
         (*curmtd)->mtdinfo->erase = slram_erase;
        (*curmtd)->mtdinfo->point = slram_point;
        (*curmtd)->mtdinfo->unpoint = slram_unpoint;
index b5994ea56a5a19ba6aae6f297e370ea9bd1b4d60..cc7be33b422552d9a58027cb5ef539d1f35f12cb 100644 (file)
@@ -35,20 +35,14 @@ struct mtd_oob_buf {
 
 #define MTD_CLEAR_BITS         1       // Bits can be cleared (flash)
 #define MTD_SET_BITS           2       // Bits can be set
-#define MTD_ERASEABLE          4       // Has an erase function
-#define MTD_WRITEB_WRITEABLE   8       // Direct IO is possible
-#define MTD_VOLATILE           16      // Set for RAMs
-#define MTD_XIP                        32      // eXecute-In-Place possible
-#define MTD_OOB                        64      // Out-of-band data (NAND flash)
 #define MTD_ECC                        128     // Device capable of automatic ECC
-#define MTD_NO_VIRTBLOCKS      256     // Virtual blocks not allowed
 #define MTD_PROGRAM_REGIONS    512     // Configurable Programming Regions
 
 // Some common devices / combinations of capabilities
 #define MTD_CAP_ROM            0
-#define MTD_CAP_RAM            (MTD_CLEAR_BITS|MTD_SET_BITS|MTD_WRITEB_WRITEABLE)
-#define MTD_CAP_NORFLASH        (MTD_CLEAR_BITS|MTD_ERASEABLE)
-#define MTD_CAP_NANDFLASH       (MTD_CLEAR_BITS|MTD_ERASEABLE|MTD_OOB)
+#define MTD_CAP_RAM            (MTD_CLEAR_BITS|MTD_SET_BITS)
+#define MTD_CAP_NORFLASH       (MTD_CLEAR_BITS)
+#define MTD_CAP_NANDFLASH      (MTD_CLEAR_BITS)
 #define MTD_WRITEABLE          (MTD_CLEAR_BITS|MTD_SET_BITS)