summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJörn Engel <joern@wohnheim.fh-wedel.de>2006-04-13 18:54:34 +0200
committerDavid Woodhouse <dwmw2@infradead.org>2006-04-17 15:48:17 +0100
commita6c591eda3078f92e7a3ff3db55f6841e4819fb5 (patch)
tree1d1c2ab720bc9931f00b8cc177878a6ad8ec5651
parentaf63a3bcac77d8c01f3d963bac11a6f3f9b7c473 (diff)
downloadop-kernel-dev-a6c591eda3078f92e7a3ff3db55f6841e4819fb5.zip
op-kernel-dev-a6c591eda3078f92e7a3ff3db55f6841e4819fb5.tar.gz
Remove unchecked MTD flags
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>
-rw-r--r--drivers/mtd/chips/map_ram.c2
-rw-r--r--drivers/mtd/devices/phram.c2
-rw-r--r--drivers/mtd/devices/slram.c3
-rw-r--r--include/mtd/mtd-abi.h12
4 files changed, 6 insertions, 13 deletions
diff --git a/drivers/mtd/chips/map_ram.c b/drivers/mtd/chips/map_ram.c
index bd2e876..7639257 100644
--- a/drivers/mtd/chips/map_ram.c
+++ b/drivers/mtd/chips/map_ram.c
@@ -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))
diff --git a/drivers/mtd/devices/phram.c b/drivers/mtd/devices/phram.c
index e8685ee..41af969 100644
--- a/drivers/mtd/devices/phram.c
+++ b/drivers/mtd/devices/phram.c
@@ -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;
diff --git a/drivers/mtd/devices/slram.c b/drivers/mtd/devices/slram.c
index 6faee6c..b3f665e 100644
--- a/drivers/mtd/devices/slram.c
+++ b/drivers/mtd/devices/slram.c
@@ -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;
diff --git a/include/mtd/mtd-abi.h b/include/mtd/mtd-abi.h
index b5994ea..cc7be33 100644
--- a/include/mtd/mtd-abi.h
+++ b/include/mtd/mtd-abi.h
@@ -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)
OpenPOWER on IntegriCloud