diff options
author | Jörn Engel <joern@wohnheim.fh-wedel.de> | 2006-04-13 12:54:34 -0400 |
---|---|---|
committer | David Woodhouse <dwmw2@infradead.org> | 2006-04-17 10:48:17 -0400 |
commit | a6c591eda3078f92e7a3ff3db55f6841e4819fb5 (patch) | |
tree | 1d1c2ab720bc9931f00b8cc177878a6ad8ec5651 | |
parent | af63a3bcac77d8c01f3d963bac11a6f3f9b7c473 (diff) |
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.c | 2 | ||||
-rw-r--r-- | drivers/mtd/devices/phram.c | 2 | ||||
-rw-r--r-- | drivers/mtd/devices/slram.c | 3 | ||||
-rw-r--r-- | include/mtd/mtd-abi.h | 12 |
4 files changed, 6 insertions, 13 deletions
diff --git a/drivers/mtd/chips/map_ram.c b/drivers/mtd/chips/map_ram.c index bd2e876a814b..763925747db6 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) | |||
70 | mtd->read = mapram_read; | 70 | mtd->read = mapram_read; |
71 | mtd->write = mapram_write; | 71 | mtd->write = mapram_write; |
72 | mtd->sync = mapram_nop; | 72 | mtd->sync = mapram_nop; |
73 | mtd->flags = MTD_CAP_RAM | MTD_VOLATILE; | 73 | mtd->flags = MTD_CAP_RAM; |
74 | 74 | ||
75 | mtd->erasesize = PAGE_SIZE; | 75 | mtd->erasesize = PAGE_SIZE; |
76 | while(mtd->size & (mtd->erasesize - 1)) | 76 | while(mtd->size & (mtd->erasesize - 1)) |
diff --git a/drivers/mtd/devices/phram.c b/drivers/mtd/devices/phram.c index e8685ee6c1e4..41af9693d880 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) | |||
142 | 142 | ||
143 | new->mtd.name = name; | 143 | new->mtd.name = name; |
144 | new->mtd.size = len; | 144 | new->mtd.size = len; |
145 | new->mtd.flags = MTD_CAP_RAM | MTD_ERASEABLE | MTD_VOLATILE; | 145 | new->mtd.flags = MTD_CAP_RAM; |
146 | new->mtd.erase = phram_erase; | 146 | new->mtd.erase = phram_erase; |
147 | new->mtd.point = phram_point; | 147 | new->mtd.point = phram_point; |
148 | new->mtd.unpoint = phram_unpoint; | 148 | new->mtd.unpoint = phram_unpoint; |
diff --git a/drivers/mtd/devices/slram.c b/drivers/mtd/devices/slram.c index 6faee6c6958c..b3f665e3c38b 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 | |||
200 | 200 | ||
201 | (*curmtd)->mtdinfo->name = name; | 201 | (*curmtd)->mtdinfo->name = name; |
202 | (*curmtd)->mtdinfo->size = length; | 202 | (*curmtd)->mtdinfo->size = length; |
203 | (*curmtd)->mtdinfo->flags = MTD_CLEAR_BITS | MTD_SET_BITS | | 203 | (*curmtd)->mtdinfo->flags = MTD_CAP_RAM; |
204 | MTD_WRITEB_WRITEABLE | MTD_VOLATILE | MTD_CAP_RAM; | ||
205 | (*curmtd)->mtdinfo->erase = slram_erase; | 204 | (*curmtd)->mtdinfo->erase = slram_erase; |
206 | (*curmtd)->mtdinfo->point = slram_point; | 205 | (*curmtd)->mtdinfo->point = slram_point; |
207 | (*curmtd)->mtdinfo->unpoint = slram_unpoint; | 206 | (*curmtd)->mtdinfo->unpoint = slram_unpoint; |
diff --git a/include/mtd/mtd-abi.h b/include/mtd/mtd-abi.h index b5994ea56a5a..cc7be33b4225 100644 --- a/include/mtd/mtd-abi.h +++ b/include/mtd/mtd-abi.h | |||
@@ -35,20 +35,14 @@ struct mtd_oob_buf { | |||
35 | 35 | ||
36 | #define MTD_CLEAR_BITS 1 // Bits can be cleared (flash) | 36 | #define MTD_CLEAR_BITS 1 // Bits can be cleared (flash) |
37 | #define MTD_SET_BITS 2 // Bits can be set | 37 | #define MTD_SET_BITS 2 // Bits can be set |
38 | #define MTD_ERASEABLE 4 // Has an erase function | ||
39 | #define MTD_WRITEB_WRITEABLE 8 // Direct IO is possible | ||
40 | #define MTD_VOLATILE 16 // Set for RAMs | ||
41 | #define MTD_XIP 32 // eXecute-In-Place possible | ||
42 | #define MTD_OOB 64 // Out-of-band data (NAND flash) | ||
43 | #define MTD_ECC 128 // Device capable of automatic ECC | 38 | #define MTD_ECC 128 // Device capable of automatic ECC |
44 | #define MTD_NO_VIRTBLOCKS 256 // Virtual blocks not allowed | ||
45 | #define MTD_PROGRAM_REGIONS 512 // Configurable Programming Regions | 39 | #define MTD_PROGRAM_REGIONS 512 // Configurable Programming Regions |
46 | 40 | ||
47 | // Some common devices / combinations of capabilities | 41 | // Some common devices / combinations of capabilities |
48 | #define MTD_CAP_ROM 0 | 42 | #define MTD_CAP_ROM 0 |
49 | #define MTD_CAP_RAM (MTD_CLEAR_BITS|MTD_SET_BITS|MTD_WRITEB_WRITEABLE) | 43 | #define MTD_CAP_RAM (MTD_CLEAR_BITS|MTD_SET_BITS) |
50 | #define MTD_CAP_NORFLASH (MTD_CLEAR_BITS|MTD_ERASEABLE) | 44 | #define MTD_CAP_NORFLASH (MTD_CLEAR_BITS) |
51 | #define MTD_CAP_NANDFLASH (MTD_CLEAR_BITS|MTD_ERASEABLE|MTD_OOB) | 45 | #define MTD_CAP_NANDFLASH (MTD_CLEAR_BITS) |
52 | #define MTD_WRITEABLE (MTD_CLEAR_BITS|MTD_SET_BITS) | 46 | #define MTD_WRITEABLE (MTD_CLEAR_BITS|MTD_SET_BITS) |
53 | 47 | ||
54 | 48 | ||