[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>
This commit is contained in:
@@ -289,7 +289,7 @@ static int mtdblock_open(struct mtd_blktrans_dev *mbd)
|
||||
|
||||
mutex_init(&mtdblk->cache_mutex);
|
||||
mtdblk->cache_state = STATE_EMPTY;
|
||||
if (mtdblk->mtd->type != MTD_RAM && mtdblk->mtd->erasesize) {
|
||||
if ( !(mtdblk->mtd->flags & MTD_NO_ERASE) && mtdblk->mtd->erasesize) {
|
||||
mtdblk->cache_size = mtdblk->mtd->erasesize;
|
||||
mtdblk->cache_data = NULL;
|
||||
}
|
||||
|
Reference in New Issue
Block a user