+ mtd-simplify-test-for-ram-devices.patch added to -mm tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The patch titled

     mtd: simplify test for RAM devices

has been added to the -mm tree.  Its filename is

     mtd-simplify-test-for-ram-devices.patch

See http://www.zip.com.au/~akpm/linux/patches/stuff/added-to-mm.txt to find
out what to do about this


From: Joern Engel <joern@xxxxxxxxxxxxxxxxxxxx>

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: Joern Engel <joern@xxxxxxxxxxxxxxxxxxxx>
Cc: David Woodhouse <dwmw2@xxxxxxxxxxxxx>
Cc: Thomas Gleixner <tglx@xxxxxxxxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxx>
---

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

diff -puN drivers/mtd/mtdblock.c~mtd-simplify-test-for-ram-devices drivers/mtd/mtdblock.c
--- 25/drivers/mtd/mtdblock.c~mtd-simplify-test-for-ram-devices	Thu Apr 13 15:45:35 2006
+++ 25-akpm/drivers/mtd/mtdblock.c	Thu Apr 13 15:45:35 2006
@@ -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;
 	}
_

Patches currently in -mm which might be from joern@xxxxxxxxxxxxxxxxxxxx are

origin.patch
mtd-improve-parameter-parsing-for-block2mtd.patch
mtd-simplify-test-for-ram-devices.patch
mtd-make-mtdblock_ro-unconditionally-readonly.patch
mtd-remove-unchecked-flags.patch
mtd-remove-unused-types.patch

-
To unsubscribe from this list: send the line "unsubscribe mm-commits" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Kernel Newbies FAQ]     [Kernel Archive]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Photo]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]

  Powered by Linux