Make mtdblock_ro unconditionally readonly

Linux-MTD Mailing List linux-mtd at lists.infradead.org
Wed May 3 13:56:31 EDT 2006


commit af63a3bcac77d8c01f3d963bac11a6f3f9b7c473
tree 0c4ce08cb4a1c377e7c0c30aac9eb4c025fd8e9a
parent 7f7c08dfdf5bc0a7c906285d9d97b932f83e8979
author Jörn Engel <joern at wohnheim.fh-wedel.de> Thu, 13 Apr 2006 18:53:55 +0200
committer David Woodhouse <dwmw2 at infradead.org> Mon, 17 Apr 2006 15:48:16 +0100

Make mtdblock_ro unconditionally readonly

mtdblock_ro is by definition readonly.  Remove the silly checks.

Signed-off-by: Jörn Engel <joern at wohnheim.fh-wedel.de>
Signed-off-by: David Woodhouse <dwmw2 at infradead.org>

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

diff --git a/drivers/mtd/mtdblock_ro.c b/drivers/mtd/mtdblock_ro.c
index 0c830ba..29563ed 100644
--- a/drivers/mtd/mtdblock_ro.c
+++ b/drivers/mtd/mtdblock_ro.c
@@ -45,9 +45,7 @@ static void mtdblock_add_mtd(struct mtd_
 	dev->blksize = 512;
 	dev->size = mtd->size >> 9;
 	dev->tr = tr;
-	if ((mtd->flags & (MTD_CLEAR_BITS|MTD_SET_BITS|MTD_WRITEABLE)) !=
-	    (MTD_CLEAR_BITS|MTD_SET_BITS|MTD_WRITEABLE))
-		dev->readonly = 1;
+	dev->readonly = 1;
 
 	add_mtd_blktrans_dev(dev);
 }




More information about the linux-mtd-cvs mailing list