From: Adrian Hunter Date: Fri, 30 May 2008 12:56:18 +0000 (+0300) Subject: [MTD] [NAND] nandsim: fix size bug X-Git-Tag: upstream/snapshot3+hdmi~23352^2~46 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=af3deccfa67341a9df39b6f734afcc85998ad4b7;p=platform%2Fadaptation%2Frenesas_rcar%2Frenesas_kernel.git [MTD] [NAND] nandsim: fix size bug Signed-off-by: Adrian Hunter Signed-off-by: David Woodhouse --- diff --git a/drivers/mtd/nand/nandsim.c b/drivers/mtd/nand/nandsim.c index bb885d1..b28d760 100644 --- a/drivers/mtd/nand/nandsim.c +++ b/drivers/mtd/nand/nandsim.c @@ -511,7 +511,7 @@ static int init_nandsim(struct mtd_info *mtd) } if (ns->options & OPT_SMALLPAGE) { - if (ns->geom.totsz < (32 << 20)) { + if (ns->geom.totsz <= (32 << 20)) { ns->geom.pgaddrbytes = 3; ns->geom.secaddrbytes = 2; } else {