[PATCH 2/4] Make mtdblock_ro unconditionally readonly

From: Jörn Engel
Date: Thu Apr 13 2006 - 12:54:15 EST


mtdblock_ro is by definition readonly. Remove the silly checks.

Signed-off-by: Jörn Engel <joern@xxxxxxxxxxxxxxxxxxxx>
---

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

--- mtd_type/drivers/mtd/mtdblock_ro.c~mtdblock_ro 2006-04-13 17:56:54.000000000 +0200
+++ mtd_type/drivers/mtd/mtdblock_ro.c 2006-04-13 17:57:31.000000000 +0200
@@ -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);
}
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/