lkml.org 
[lkml]   [2006]   [Apr]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[PATCH 1/4] 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>
---

drivers/mtd/mtdblock.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)


--- mtd_type/drivers/mtd/mtdblock.c~mtdblock_ram_test 2006-04-13 18:03:41.000000000 +0200
+++ mtd_type/drivers/mtd/mtdblock.c 2006-04-13 18:19:19.000000000 +0200
@@ -288,8 +288,7 @@ static int mtdblock_open(struct mtd_blkt

mutex_init(&mtdblk->cache_mutex);
mtdblk->cache_state = STATE_EMPTY;
- if ((mtdblk->mtd->flags & MTD_CAP_RAM) != MTD_CAP_RAM &&
- mtdblk->mtd->erasesize) {
+ if (mtdblk->mtd->type != MTD_RAM && mtdblk->mtd->erasesize) {
mtdblk->cache_size = mtdblk->mtd->erasesize;
mtdblk->cache_data = NULL;
}
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
\
 
 \ /
  Last update: 2006-04-13 18:55    [W:0.101 / U:0.116 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site