Skip to content

Commit

Permalink
Make mtdblock_ro unconditionally readonly
Browse files Browse the repository at this point in the history
mtdblock_ro is by definition readonly.  Remove the silly checks.

Signed-off-by: Jörn Engel <[email protected]>
Signed-off-by: David Woodhouse <[email protected]>
  • Loading branch information
Jörn Engel authored and dwmw2 committed Apr 17, 2006
1 parent 7f7c08d commit af63a3b
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions drivers/mtd/mtdblock_ro.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down

0 comments on commit af63a3b

Please sign in to comment.