[MTD] [NAND] nandsim: fix overridesize

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=07293b20083cb66df35bf2041f0c554eaac43e8c
Commit:     07293b20083cb66df35bf2041f0c554eaac43e8c
Parent:     af3deccfa67341a9df39b6f734afcc85998ad4b7
Author:     Adrian Hunter <ext-adrian.hunter at nokia.com>
AuthorDate: Fri May 30 15:56:23 2008 +0300
Committer:  David Woodhouse <dwmw2 at infradead.org>
CommitDate: Wed Jun 4 17:47:43 2008 +0100

    [MTD] [NAND] nandsim: fix overridesize
    
    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 |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/drivers/mtd/nand/nandsim.c b/drivers/mtd/nand/nandsim.c
index b28d760..b480516 100644
--- a/drivers/mtd/nand/nandsim.c
+++ b/drivers/mtd/nand/nandsim.c
@@ -2022,6 +2022,7 @@ static int __init ns_init_module(void)
 		nsmtd->size = new_size;
 		chip->chipsize = new_size;
 		chip->chip_shift = ffs(new_size) - 1;
+		chip->pagemask = (chip->chipsize >> chip->page_shift) - 1;
 	}
 
 	if ((retval = setup_wear_reporting(nsmtd)) != 0)



More information about the linux-mtd-cvs mailing list