diff --git a/drivers/mtd/nand/nandsim.c b/drivers/mtd/nand/nandsim.c index b28d76013ab698a5aa812f54fd96c9d06520ea68..b480516847334bef4734821966d0e167b2543146 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)