Several flags are set by some devices, but never checked. Remove them.
Signed-off-by: Jörn Engel <[email protected]>
---
drivers/mtd/chips/map_ram.c | 2 +-
drivers/mtd/devices/phram.c | 2 +-
drivers/mtd/devices/slram.c | 3 +--
include/mtd/mtd-abi.h | 12 +++---------
4 files changed, 6 insertions(+), 13 deletions(-)
--- mtd_type/include/mtd/mtd-abi.h~unchecked_flags 2006-04-13 18:30:42.000000000 +0200
+++ mtd_type/include/mtd/mtd-abi.h 2006-04-13 18:32:42.000000000 +0200
@@ -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)
--- mtd_type/drivers/mtd/devices/phram.c~unchecked_flags 2006-04-13 18:30:42.000000000 +0200
+++ mtd_type/drivers/mtd/devices/phram.c 2006-04-13 18:31:00.000000000 +0200
@@ -142,7 +142,7 @@ static int register_device(char *name, u
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;
--- mtd_type/drivers/mtd/chips/map_ram.c~unchecked_flags 2006-04-13 18:30:42.000000000 +0200
+++ mtd_type/drivers/mtd/chips/map_ram.c 2006-04-13 18:31:00.000000000 +0200
@@ -70,7 +70,7 @@ static struct mtd_info *map_ram_probe(st
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))
--- mtd_type/drivers/mtd/devices/slram.c~unchecked_flags 2006-04-13 18:30:42.000000000 +0200
+++ mtd_type/drivers/mtd/devices/slram.c 2006-04-13 18:31:00.000000000 +0200
@@ -200,8 +200,7 @@ static int register_device(char *name, u
(*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;
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[Index of Archives]
[Kernel Newbies]
[Netfilter]
[Bugtraq]
[Photo]
[Stuff]
[Gimp]
[Yosemite News]
[MIPS Linux]
[ARM Linux]
[Linux Security]
[Linux RAID]
[Video 4 Linux]
[Linux for the blind]
[Linux Resources]