From: Jörn Engel Date: Thu, 13 Apr 2006 16:53:55 +0000 (+0200) Subject: Make mtdblock_ro unconditionally readonly X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=af63a3bcac77d8c01f3d963bac11a6f3f9b7c473;p=openwrt%2Fstaging%2Fblogic.git Make mtdblock_ro unconditionally readonly mtdblock_ro is by definition readonly. Remove the silly checks. Signed-off-by: Jörn Engel Signed-off-by: David Woodhouse --- diff --git a/drivers/mtd/mtdblock_ro.c b/drivers/mtd/mtdblock_ro.c index 0c830ba41ef0..29563ed258a4 100644 --- a/drivers/mtd/mtdblock_ro.c +++ b/drivers/mtd/mtdblock_ro.c @@ -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); }