summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAdrian Hunter <ext-adrian.hunter@nokia.com>2008-05-30 14:56:23 +0200
committerDavid Woodhouse <dwmw2@infradead.org>2008-06-04 18:47:43 +0200
commit07293b20083cb66df35bf2041f0c554eaac43e8c (patch)
treedc481086138e1d9106b3547ae9b4f13edff60b59
parent[MTD] [NAND] nandsim: fix size bug (diff)
downloadlinux-07293b20083cb66df35bf2041f0c554eaac43e8c.tar.xz
linux-07293b20083cb66df35bf2041f0c554eaac43e8c.zip
[MTD] [NAND] nandsim: fix overridesize
Signed-off-by: Adrian Hunter <ext-adrian.hunter@nokia.com> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
-rw-r--r--drivers/mtd/nand/nandsim.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/mtd/nand/nandsim.c b/drivers/mtd/nand/nandsim.c
index b28d76013ab6..b48051684733 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)