提交 af63a3bc 编写于 作者: J Jörn Engel 提交者: David Woodhouse

Make mtdblock_ro unconditionally readonly

mtdblock_ro is by definition readonly.  Remove the silly checks.
Signed-off-by: NJörn Engel <joern@wohnheim.fh-wedel.de>
Signed-off-by: NDavid Woodhouse <dwmw2@infradead.org>
上级 7f7c08df
......@@ -45,9 +45,7 @@ static void mtdblock_add_mtd(struct mtd_blktrans_ops *tr, struct mtd_info *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);
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册