[MTD] [NAND] nandsim: fix size bug
Adrian Hunter [Fri, 30 May 2008 12:56:18 +0000 (15:56 +0300)]
Signed-off-by: Adrian Hunter <ext-adrian.hunter@nokia.com>
Signed-off-by: David Woodhouse <dwmw2@infradead.org>

drivers/mtd/nand/nandsim.c

index bb885d1..b28d760 100644 (file)
@@ -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 {