Make mtdblock_ro unconditionally readonly
mtdblock_ro is by definition readonly. Remove the silly checks. Signed-off-by: Jörn Engel <joern@wohnheim.fh-wedel.de> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
This commit is contained in:
committed by
David Woodhouse
parent
7f7c08dfdf
commit
af63a3bcac
@@ -45,8 +45,6 @@ static void mtdblock_add_mtd(struct mtd_blktrans_ops *tr, struct mtd_info *mtd)
|
|||||||
dev->blksize = 512;
|
dev->blksize = 512;
|
||||||
dev->size = mtd->size >> 9;
|
dev->size = mtd->size >> 9;
|
||||||
dev->tr = tr;
|
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);
|
add_mtd_blktrans_dev(dev);
|
||||||
|
Reference in New Issue
Block a user