aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mtd
diff options
context:
space:
mode:
authorJoern Engel <joern@wh.fh-wedel.de>2006-05-30 08:25:24 -0400
committerJoern Engel <joern@wh.fh-wedel.de>2006-05-30 08:25:24 -0400
commit92cbfdcc3661d7670b01b92b89811cd3a2412297 (patch)
tree70e4c9a94a121594e58a57c4c454ac854bb10a3a /drivers/mtd
parente369d62e92d526a7ed641e2f0b2978fb0ce366c5 (diff)
[MTD] replace MTD_RAM with MTD_GENERIC_TYPE
Ram devices get the extra capability of MTD_NO_ERASE - not requiring an explicit erase before writing to it. Currently only mtdblock uses this capability. Rest of the patch is a simple text replacement. Signed-off-by: Joern Engel <joern@wh.fh-wedel.de>
Diffstat (limited to 'drivers/mtd')
-rw-r--r--drivers/mtd/chips/map_ram.c2
-rw-r--r--drivers/mtd/devices/block2mtd.c2
-rw-r--r--drivers/mtd/devices/ms02-nv.c2
-rw-r--r--drivers/mtd/devices/mtdram.c2
-rw-r--r--drivers/mtd/devices/phram.c2
-rw-r--r--drivers/mtd/devices/pmc551.c2
-rw-r--r--drivers/mtd/devices/slram.c2
-rw-r--r--drivers/mtd/mtdblock.c2
8 files changed, 8 insertions, 8 deletions
diff --git a/drivers/mtd/chips/map_ram.c b/drivers/mtd/chips/map_ram.c
index 763925747db6..9b7c49930a76 100644
--- a/drivers/mtd/chips/map_ram.c
+++ b/drivers/mtd/chips/map_ram.c
@@ -64,7 +64,7 @@ static struct mtd_info *map_ram_probe(struct map_info *map)
64 map->fldrv = &mapram_chipdrv; 64 map->fldrv = &mapram_chipdrv;
65 mtd->priv = map; 65 mtd->priv = map;
66 mtd->name = map->name; 66 mtd->name = map->name;
67 mtd->type = MTD_RAM; 67 mtd->type = MTD_GENERIC_TYPE;
68 mtd->size = map->size; 68 mtd->size = map->size;
69 mtd->erase = mapram_erase; 69 mtd->erase = mapram_erase;
70 mtd->read = mapram_read; 70 mtd->read = mapram_read;
diff --git a/drivers/mtd/devices/block2mtd.c b/drivers/mtd/devices/block2mtd.c
index 0d98c223c5fc..1157182c2c8c 100644
--- a/drivers/mtd/devices/block2mtd.c
+++ b/drivers/mtd/devices/block2mtd.c
@@ -324,7 +324,7 @@ static struct block2mtd_dev *add_device(char *devname, int erase_size)
324 324
325 dev->mtd.size = dev->blkdev->bd_inode->i_size & PAGE_MASK; 325 dev->mtd.size = dev->blkdev->bd_inode->i_size & PAGE_MASK;
326 dev->mtd.erasesize = erase_size; 326 dev->mtd.erasesize = erase_size;
327 dev->mtd.type = MTD_RAM; 327 dev->mtd.type = MTD_GENERIC_TYPE;
328 dev->mtd.flags = MTD_CAP_RAM; 328 dev->mtd.flags = MTD_CAP_RAM;
329 dev->mtd.erase = block2mtd_erase; 329 dev->mtd.erase = block2mtd_erase;
330 dev->mtd.write = block2mtd_write; 330 dev->mtd.write = block2mtd_write;
diff --git a/drivers/mtd/devices/ms02-nv.c b/drivers/mtd/devices/ms02-nv.c
index 4ab7670770e4..a6466f923e7e 100644
--- a/drivers/mtd/devices/ms02-nv.c
+++ b/drivers/mtd/devices/ms02-nv.c
@@ -218,7 +218,7 @@ static int __init ms02nv_init_one(ulong addr)
218 fixsize = (size - (fixaddr - addr)) & ~(PAGE_SIZE - 1); 218 fixsize = (size - (fixaddr - addr)) & ~(PAGE_SIZE - 1);
219 mp->uaddr = phys_to_virt(fixaddr); 219 mp->uaddr = phys_to_virt(fixaddr);
220 220
221 mtd->type = MTD_RAM; 221 mtd->type = MTD_GENERIC_TYPE;
222 mtd->flags = MTD_CAP_RAM; 222 mtd->flags = MTD_CAP_RAM;
223 mtd->size = fixsize; 223 mtd->size = fixsize;
224 mtd->name = (char *)ms02nv_name; 224 mtd->name = (char *)ms02nv_name;
diff --git a/drivers/mtd/devices/mtdram.c b/drivers/mtd/devices/mtdram.c
index 1443117fd8f4..f284c9670be8 100644
--- a/drivers/mtd/devices/mtdram.c
+++ b/drivers/mtd/devices/mtdram.c
@@ -103,7 +103,7 @@ int mtdram_init_device(struct mtd_info *mtd, void *mapped_address,
103 103
104 /* Setup the MTD structure */ 104 /* Setup the MTD structure */
105 mtd->name = name; 105 mtd->name = name;
106 mtd->type = MTD_RAM; 106 mtd->type = MTD_GENERIC_TYPE;
107 mtd->flags = MTD_CAP_RAM; 107 mtd->flags = MTD_CAP_RAM;
108 mtd->size = size; 108 mtd->size = size;
109 mtd->erasesize = MTDRAM_ERASE_SIZE; 109 mtd->erasesize = MTDRAM_ERASE_SIZE;
diff --git a/drivers/mtd/devices/phram.c b/drivers/mtd/devices/phram.c
index e09e416667d3..e6daa74d5fc6 100644
--- a/drivers/mtd/devices/phram.c
+++ b/drivers/mtd/devices/phram.c
@@ -149,7 +149,7 @@ static int register_device(char *name, unsigned long start, unsigned long len)
149 new->mtd.read = phram_read; 149 new->mtd.read = phram_read;
150 new->mtd.write = phram_write; 150 new->mtd.write = phram_write;
151 new->mtd.owner = THIS_MODULE; 151 new->mtd.owner = THIS_MODULE;
152 new->mtd.type = MTD_RAM; 152 new->mtd.type = MTD_GENERIC_TYPE;
153 new->mtd.erasesize = PAGE_SIZE; 153 new->mtd.erasesize = PAGE_SIZE;
154 154
155 ret = -EAGAIN; 155 ret = -EAGAIN;
diff --git a/drivers/mtd/devices/pmc551.c b/drivers/mtd/devices/pmc551.c
index 666cce1bf60c..aa9f6c993125 100644
--- a/drivers/mtd/devices/pmc551.c
+++ b/drivers/mtd/devices/pmc551.c
@@ -775,7 +775,7 @@ static int __init init_pmc551(void)
775 mtd->write = pmc551_write; 775 mtd->write = pmc551_write;
776 mtd->point = pmc551_point; 776 mtd->point = pmc551_point;
777 mtd->unpoint = pmc551_unpoint; 777 mtd->unpoint = pmc551_unpoint;
778 mtd->type = MTD_RAM; 778 mtd->type = MTD_GENERIC_TYPE;
779 mtd->name = "PMC551 RAM board"; 779 mtd->name = "PMC551 RAM board";
780 mtd->erasesize = 0x10000; 780 mtd->erasesize = 0x10000;
781 mtd->owner = THIS_MODULE; 781 mtd->owner = THIS_MODULE;
diff --git a/drivers/mtd/devices/slram.c b/drivers/mtd/devices/slram.c
index b3f665e3c38b..fdb7a78b5304 100644
--- a/drivers/mtd/devices/slram.c
+++ b/drivers/mtd/devices/slram.c
@@ -207,7 +207,7 @@ static int register_device(char *name, unsigned long start, unsigned long length
207 (*curmtd)->mtdinfo->read = slram_read; 207 (*curmtd)->mtdinfo->read = slram_read;
208 (*curmtd)->mtdinfo->write = slram_write; 208 (*curmtd)->mtdinfo->write = slram_write;
209 (*curmtd)->mtdinfo->owner = THIS_MODULE; 209 (*curmtd)->mtdinfo->owner = THIS_MODULE;
210 (*curmtd)->mtdinfo->type = MTD_RAM; 210 (*curmtd)->mtdinfo->type = MTD_GENERIC_TYPE;
211 (*curmtd)->mtdinfo->erasesize = SLRAM_BLK_SZ; 211 (*curmtd)->mtdinfo->erasesize = SLRAM_BLK_SZ;
212 212
213 if (add_mtd_device((*curmtd)->mtdinfo)) { 213 if (add_mtd_device((*curmtd)->mtdinfo)) {
diff --git a/drivers/mtd/mtdblock.c b/drivers/mtd/mtdblock.c
index 9b0bc20e4d8d..e5c78463ebfd 100644
--- a/drivers/mtd/mtdblock.c
+++ b/drivers/mtd/mtdblock.c
@@ -289,7 +289,7 @@ static int mtdblock_open(struct mtd_blktrans_dev *mbd)
289 289
290 mutex_init(&mtdblk->cache_mutex); 290 mutex_init(&mtdblk->cache_mutex);
291 mtdblk->cache_state = STATE_EMPTY; 291 mtdblk->cache_state = STATE_EMPTY;
292 if (mtdblk->mtd->type != MTD_RAM && mtdblk->mtd->erasesize) { 292 if ( !(mtdblk->mtd->flags & MTD_NO_ERASE) && mtdblk->mtd->erasesize) {
293 mtdblk->cache_size = mtdblk->mtd->erasesize; 293 mtdblk->cache_size = mtdblk->mtd->erasesize;
294 mtdblk->cache_data = NULL; 294 mtdblk->cache_data = NULL;
295 } 295 }