aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mtd/mtdblock.c
diff options
context:
space:
mode:
authorJörn Engel <joern@wohnheim.fh-wedel.de>2006-04-13 12:53:14 -0400
committerDavid Woodhouse <dwmw2@infradead.org>2006-04-17 10:48:16 -0400
commit7f7c08dfdf5bc0a7c906285d9d97b932f83e8979 (patch)
treeaaf40f4ef508cee41586e788d7d3f9e7075c364d /drivers/mtd/mtdblock.c
parent94171db1d2f23c22b6050d210b72db3bb2f0b81e (diff)
Simplify test for RAM devices
mtdblock is the only user of aggregate capabilities in mtd. This is clearly bogus and should be changed. In particular, it tries to determine whether the device in question is a piece of RAM. For every single driver that fits the current criteria, an easier test would be to check for the type being MTD_RAM. Signed-off-by: Jörn Engel <joern@wohnheim.fh-wedel.de> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Diffstat (limited to 'drivers/mtd/mtdblock.c')
-rw-r--r--drivers/mtd/mtdblock.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/mtd/mtdblock.c b/drivers/mtd/mtdblock.c
index 2cef280e388c..8e50170137e0 100644
--- a/drivers/mtd/mtdblock.c
+++ b/drivers/mtd/mtdblock.c
@@ -288,8 +288,7 @@ static int mtdblock_open(struct mtd_blktrans_dev *mbd)
288 288
289 mutex_init(&mtdblk->cache_mutex); 289 mutex_init(&mtdblk->cache_mutex);
290 mtdblk->cache_state = STATE_EMPTY; 290 mtdblk->cache_state = STATE_EMPTY;
291 if ((mtdblk->mtd->flags & MTD_CAP_RAM) != MTD_CAP_RAM && 291 if (mtdblk->mtd->type != MTD_RAM && mtdblk->mtd->erasesize) {
292 mtdblk->mtd->erasesize) {
293 mtdblk->cache_size = mtdblk->mtd->erasesize; 292 mtdblk->cache_size = mtdblk->mtd->erasesize;
294 mtdblk->cache_data = NULL; 293 mtdblk->cache_data = NULL;
295 } 294 }