[MTD] [NAND] nandsim: fix size bug

Linux-MTD Mailing List linux-mtd at lists.infradead.org
Wed Jun 4 13:59:02 EDT 2008


Gitweb:     http://git.infradead.org/?p=mtd-2.6.git;a=commit;h=af3deccfa67341a9df39b6f734afcc85998ad4b7
Commit:     af3deccfa67341a9df39b6f734afcc85998ad4b7
Parent:     83973b87938a06a2af7e2a7fd1b630c35f8baff4
Author:     Adrian Hunter <ext-adrian.hunter at nokia.com>
AuthorDate: Fri May 30 15:56:18 2008 +0300
Committer:  David Woodhouse <dwmw2 at infradead.org>
CommitDate: Wed Jun 4 17:47:35 2008 +0100

    [MTD] [NAND] nandsim: fix size bug
    
    Signed-off-by: Adrian Hunter <ext-adrian.hunter at nokia.com>
    Signed-off-by: David Woodhouse <dwmw2 at infradead.org>
---
 drivers/mtd/nand/nandsim.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

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 {



More information about the linux-mtd-cvs mailing list