Przeglądaj źródła

[MTD] [NAND] nandsim: fix overridesize

Signed-off-by: Adrian Hunter <ext-adrian.hunter@nokia.com>
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Adrian Hunter 17 lat temu
rodzic
commit
07293b2008
1 zmienionych plików z 1 dodań i 0 usunięć
  1. 1 0
      drivers/mtd/nand/nandsim.c

+ 1 - 0
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)